Skip to content
This repository has been archived by the owner on Jun 16, 2019. It is now read-only.

How to cluster circle markers? #141

Open
cybercuffs opened this issue Feb 1, 2018 · 0 comments
Open

How to cluster circle markers? #141

cybercuffs opened this issue Feb 1, 2018 · 0 comments

Comments

@cybercuffs
Copy link

Hi,
I'm trying to do clustering of circle markers

var marker =  new google.maps.Circle({
            strokeColor: strokeColor,
            strokeOpacity: 0.8,
            strokeWeight: 2,
            fillColor: fillColor,
            fillOpacity: 0.35,
            center: center,
            radius: radius
          }); 

but when I try to cluster,

var markerCluster = new MarkerClusterer(map, marker, {imagePath: 'https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/m'});

It gives me error:
markerclusterer.js:653 Uncaught TypeError: marker.getPosition is not a function

I checked the proto and sure it does not have the getPosition() unlike in case when I create a regular marker like,

var marker = new google.maps.Marker({
            position: location
});
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant