Skip to content

Instantly share code, notes, and snippets.

@Nickztar
Created March 17, 2021 14:23
Show Gist options
  • Select an option

  • Save Nickztar/f31928fd8e41e4176e159a6b4502bd12 to your computer and use it in GitHub Desktop.

Select an option

Save Nickztar/f31928fd8e41e4176e159a6b4502bd12 to your computer and use it in GitHub Desktop.
Specify cluster images
addClusteringMarkers(guid, mapGuid, markers, imagePath = "_content/BlazorGoogleMaps/m") {
const map = window._blazorGoogleMapsObjects[mapGuid];
const originalMarkers = markers.map((marker, i) => {
return window._blazorGoogleMapsObjects[marker.guid];
});
const markerCluster = new MarkerClusterer(map, originalMarkers, {
imagePath:
imagePath
});
if ("set" in markerCluster) {
markerCluster.set("guidString", guid);
}
window._blazorGoogleMapsObjects[guid] = markerCluster;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment