Esempio n. 1
0
        /// <summary>
        /// Creates a new instance of HeatmapLayer.
        /// </summary>
        /// <param name="opts"></param>
        public async static Task <HeatmapLayer> CreateAsync(IJSRuntime jsRuntime, HeatmapLayerOptions opts = null)
        {
            var jsObjectRef = await JsObjectRef.CreateAsync(jsRuntime, "google.maps.visualization.HeatmapLayer", opts);

            var obj = new HeatmapLayer(jsObjectRef, opts);

            return(obj);
        }
Esempio n. 2
0
 public Task SetOptions(HeatmapLayerOptions options)
 {
     return(_jsRuntime.InvokeWithDefinedGuidAndMethodAsync <object>(
                $"{jsObjectName}.invoke",
                _guid.ToString(),
                "setOptions",
                options));
 }
Esempio n. 3
0
        /// <summary>
        /// Creates a new instance of HeatmapLayer.
        /// </summary>
        /// <param name="opts"></param>
        public HeatmapLayer(IJSRuntime jsRuntime, HeatmapLayerOptions opts = null)
            : base(jsRuntime)
        {
            if (opts != null)
            {
                _map = opts.Map;

                _jsRuntime.InvokeWithDefinedGuidAsync <bool>(
                    $"{jsObjectName}.init",
                    _guid.ToString(),
                    opts);
            }
            else
            {
                _jsRuntime.InvokeWithDefinedGuidAsync <bool>(
                    $"{jsObjectName}.init",
                    _guid.ToString());
            }
        }
Esempio n. 4
0
 public Task SetOptions(HeatmapLayerOptions options)
 {
     return(_jsObjectRef.InvokeAsync(
                "setOptions",
                options));
 }
Esempio n. 5
0
 /// <summary>
 /// Creates a new instance of HeatmapLayer.
 /// </summary>
 /// <param name="opts"></param>
 private HeatmapLayer(JsObjectRef jsObjectRef, HeatmapLayerOptions opts = null)
 {
     _jsObjectRef = jsObjectRef;
     _map         = opts?.Map;
 }