Skip to content

Instantly share code, notes, and snippets.

@imranhoshain
Created December 13, 2021 11:00
Show Gist options
  • Select an option

  • Save imranhoshain/43d8821a97900d83528fa8bccd1b9bf9 to your computer and use it in GitHub Desktop.

Select an option

Save imranhoshain/43d8821a97900d83528fa8bccd1b9bf9 to your computer and use it in GitHub Desktop.
this.markers = [];
data.forEach(function(entry) {
if (entry.location === null) return
marker = new google.maps.Marker({
position: {
lat: location.location.coordinates[0],
lng: location.location.coordinates[1]
}
});
markers.push(marker);
});
markerCluster = new MarkerClusterer(this.map, this.markers, {
imagePath: 'https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/m'
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment