Esempio n. 1
0
        /// <summary>
        /// Create a polygon using the passed PolygonOptions, which specify the polygon's path, the stroke style for the polygon's edges, and the fill style for the polygon's interior regions.
        /// A polygon may contain one or more paths, where each path consists of an array of LatLngs.
        /// </summary>
        public Polygon(IJSRuntime jsRuntime, MapEventJsInterop jsEventInterop, PolygonOptions opts = null)
            : base(jsRuntime)
        {
            if (opts?.Map != null)
            {
                _map = opts.Map;
            }

            _jsRuntime.JsonNetInvokeAsync <bool>("googleMapPolygonJsFunctions.init",
                                                 _guid,
                                                 opts);

            _jsEventInterop = jsEventInterop;

            //if (opts != null)
            //{
            //	_map = opts.Map;

            //	_jsRuntime.InvokeWithDefinedGuidAsync<bool>(
            //			"googleMapPolygonJsFunctions.init",
            //			_guid.ToString(),
            //			opts);
            //}
            //else
            //{
            //	_jsRuntime.InvokeWithDefinedGuidAsync<bool>(
            //			"googleMapPolygonJsFunctions.init",
            //			_guid.ToString());
            //}
        }
Esempio n. 2
0
        public Marker(IJSRuntime jsRuntime,
                      MapEventJsInterop jsEventInterop,
                      MarkerOptions opt = null)
            : base(jsRuntime)
        {
            if (opt?.Map != null)
            {
                _map = opt.Map;
            }

            _jsRuntime.JsonNetInvokeAsync <bool>("googleMapMarkerJsFunctions.init",
                                                 _guid,
                                                 opt);

            _jsEventInterop = jsEventInterop;
        }
Esempio n. 3
0
 internal MapEventListener(IJSRuntime jsRuntime, MapEventJsInterop mapEventJsInterop, Guid guid)
     : base(jsRuntime, guid)
 {
     _mapEventJsInterop = mapEventJsInterop;
 }