2

I started to work with Craft CMS a couple month ago, I have a client that wants to have a clustered map, I went over Smart Map documentation but I couldn't find anything about on how to add Google MarkerClusterer library.

2

As Jalen mentioned in his answer, this functionality isn't (currently) built into Smart Map. However, it's very easy to add yourself...

First, need to add the MarkerClusterer library to your map page. You can link to it normally, just as you would with any other JS library.

Once you've got the library installed, you'll be able to cluster your markers with code as simple as this:

var markerCluster = new MarkerClusterer(smartMap.map['smartmap-mapcanvas-1'], smartMap.marker);

Pretty much everything else happens automagically!

1

I don't believe Smart Map currently offers that functionality. I'd recommend opening an issue with your feature request over at https://github.com/doublesecretagency/craft-smartmap.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.