示例#1
0
        public static async Task <MarkerClustering> CreateAsync(IJSRuntime jsRuntime, Map map, IEnumerable <Marker> markers)
        {
            var guid        = System.Guid.NewGuid();
            var jsObjectRef = new JsObjectRef(jsRuntime, guid);
            await jsRuntime.InvokeVoidAsync("googleMapsObjectManager.addClusteringMarkers", guid.ToString(), map.Guid.ToString(), markers);

            var obj = new MarkerClustering(jsObjectRef);

            return(obj);
        }
        public static async Task <MarkerClustering> CreateAsync(
            IJSRuntime jsRuntime,
            Map map,
            IEnumerable <Marker> markers,
            MarkerClustererOptions?options = null
            )
        {
            options ??= new MarkerClustererOptions();

            var guid        = Guid.NewGuid();
            var jsObjectRef = new JsObjectRef(jsRuntime, guid);
            await jsRuntime.InvokeVoidAsync("googleMapsObjectManager.createClusteringMarkers", guid.ToString(), map.Guid.ToString(), markers, options);

            var obj = new MarkerClustering(jsObjectRef, map, markers);

            return(obj);
        }