示例#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);
        }
示例#2
0
 public Task SetOptions(CircleOptions options)
 {
     return(_jsRuntime.InvokeWithDefinedGuidAndMethodAsync <bool>(
                "googleMapCircleJsFunctions.invoke",
                _guid.ToString(),
                "setOptions",
                options));
 }
示例#3
0
        private Circle(JsObjectRef jsObjectRef, CircleOptions opts = null)
        {
            _jsObjectRef = jsObjectRef;

            if (opts != null)
            {
                _map = opts.Map;
            }
        }
示例#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());
            }
        }
示例#5
0
 public Task SetOptions(CircleOptions options)
 {
     return(_jsObjectRef.InvokeAsync("setOptions", options));
 }