예제 #1
0
 /// <summary>
 /// Sets the DrawingManager's options.
 /// </summary>
 /// <param name="options"></param>
 public Task SetOptions(DrawingManagerOptions options)
 {
     return(_jsRuntime.InvokeWithDefinedGuidAndMethodAsync <object>(
                "googleMapDrawingManagerJsFunctions.invoke",
                _guid.ToString(),
                "setOptions",
                options));
 }
예제 #2
0
        /// <summary>
        /// Creates a DrawingManager that allows users to draw overlays on the map, and switch between the type of overlay to be drawn with a drawing control.
        /// </summary>
        public async static Task <DrawingManager> CreateAsync(IJSRuntime jsRuntime, DrawingManagerOptions opts = null)
        {
            var jsObjectRef = await JsObjectRef.CreateAsync(jsRuntime, "google.maps.drawing.DrawingManager", opts);

            var obj = new DrawingManager(jsObjectRef, opts);

            return(obj);
        }
예제 #3
0
        /// <summary>
        /// Creates a DrawingManager that allows users to draw overlays on the map, and switch between the type of overlay to be drawn with a drawing control.
        /// </summary>
        private DrawingManager(JsObjectRef jsObjectRef, DrawingManagerOptions opt = null)
        {
            _jsObjectRef = jsObjectRef;

            if (opt?.Map != null)
            {
                _map = opt.Map;
            }
        }
예제 #4
0
        /// <summary>
        /// Creates a DrawingManager that allows users to draw overlays on the map, and switch between the type of overlay to be drawn with a drawing control.
        /// </summary>
        public DrawingManager(IJSRuntime jsRuntime, DrawingManagerOptions opt = null)
            : base(jsRuntime)
        {
            if (opt?.Map != null)
            {
                _map = opt.Map;
            }

            _jsRuntime.JsonNetInvokeAsync <bool>(
                "googleMapDrawingManagerJsFunctions.init",
                _guid,
                opt);
        }
예제 #5
0
 /// <summary>
 /// Sets the DrawingManager's options.
 /// </summary>
 /// <param name="options"></param>
 public Task SetOptions(DrawingManagerOptions options)
 {
     return(_jsObjectRef.InvokeAsync(
                "setOptions",
                options));
 }