Ejemplo n.º 1
0
        /// <summary>
        /// Create a circle using the passed CircleOptions, which specify the center, radius, and style.
        /// </summary>
        /// <param name="opts"></param>
        public async static Task <Circle> CreateAsync(IJSRuntime jsRuntime, CircleOptions opts = null)
        {
            var jsObjectRef = await JsObjectRef.CreateAsync(jsRuntime, "google.maps.Circle", opts);

            var obj = new Circle(jsObjectRef, opts);

            return(obj);
        }
Ejemplo n.º 2
0
 public Task SetOptions(CircleOptions options)
 {
     return(_jsRuntime.InvokeWithDefinedGuidAndMethodAsync <bool>(
                "googleMapCircleJsFunctions.invoke",
                _guid.ToString(),
                "setOptions",
                options));
 }
Ejemplo n.º 3
0
        private Circle(JsObjectRef jsObjectRef, CircleOptions opts = null)
        {
            _jsObjectRef = jsObjectRef;

            if (opts != null)
            {
                _map = opts.Map;
            }
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Create a circle using the passed CircleOptions, which specify the center, radius, and style.
        /// </summary>
        /// <param name="opts"></param>
        public Circle(IJSRuntime jsRuntime, CircleOptions opts = null)
            : base(jsRuntime)
        {
            if (opts != null)
            {
                _map = opts.Map;

                _jsRuntime.InvokeWithDefinedGuidAsync <bool>(
                    "googleMapCircleJsFunctions.init",
                    _guid.ToString(),
                    opts);
            }
            else
            {
                _jsRuntime.InvokeWithDefinedGuidAsync <bool>(
                    "googleMapCircleJsFunctions.init",
                    _guid.ToString());
            }
        }
Ejemplo n.º 5
0
 public Task SetOptions(CircleOptions options)
 {
     return(_jsObjectRef.InvokeAsync("setOptions", options));
 }