You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 16, 2019. It is now read-only.
Is there any way to implement marker cluster using geojson data layer? This JS supports only those markers which are created by google.maps.Marker objects.
The text was updated successfully, but these errors were encountered:
map.data.loadGeoJson('locate.json'+param,null,function(features){// group items / clustervarmarkers=features.map(function(feature){varg=feature.getGeometry();varmarker=newgoogle.maps.Marker({'position': g.get(0),'data' : feature});returnmarker;});// create a new marker clustervarmarkerCluster=newMarkerClusterer(map,markers,{imagePath: 'https://cdn.rawgit.com/googlemaps/js-marker-clusterer/gh-pages/images/m',gridSize: 15,zoomOnClick: false});// add event listener to the clustergoogle.maps.event.addListener(markerCluster,'clusterclick',function(cluster){// handle clickevent});});
Hi Everyone, for some reason this did not work for me but if I added this as as style then it worked. I wanted to mention it just in case it helps anyone else because it was driving me crazy.
map.data.setStyle({ visible: false });
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Is there any way to implement marker cluster using geojson data layer? This JS supports only those markers which are created by
google.maps.Marker
objects.The text was updated successfully, but these errors were encountered: