Example #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);
        }
 public Task SetOptions(HeatmapLayerOptions options)
 {
     return(_jsRuntime.InvokeWithDefinedGuidAndMethodAsync <object>(
                $"{jsObjectName}.invoke",
                _guid.ToString(),
                "setOptions",
                options));
 }
        /// <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());
            }
        }
Example #4
0
 public Task SetOptions(HeatmapLayerOptions options)
 {
     return(_jsObjectRef.InvokeAsync(
                "setOptions",
                options));
 }
Example #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;
 }