2amigos / yii2-google-maps-library

Google Maps API library for Yii2
https://2amigos.us
BSD 3-Clause "New" or "Revised" License
106 stars 79 forks source link

MarkerClusterer with the Google Maps #52

Open nazakar opened 8 years ago

nazakar commented 8 years ago

How to use MarkerClusterer with this extension?

kongoon commented 8 years ago

Wait for answer too..

Edofre commented 8 years ago

@nazakar @kongoon

I managed to get it working, see: https://github.com/Edofre/yii2-marker-clusterer

@amigo-tabin

If you have any suggestions for adding the clusterer to this repo let me know.

tonydspaniard commented 8 years ago

@Edofre great work!

Nevertheless, we provided a https://github.com/2amigos/yii2-google-maps-library/blob/master/PluginAbstract.php for people willing to create their own. The only thing you have to do is extend your plugin from the abstract class and add the correspondent abstracted methods.

Then you just install it: https://github.com/2amigos/yii2-google-maps-library/blob/master/Map.php#L448

After installed, the plugin would be automatically called: https://github.com/2amigos/yii2-google-maps-library/blob/master/Map.php#L421

Its getJs() would return the correspondent js that would return the initialization script from the plugin and the map automatically would append it to its initialization scripts.

tonydspaniard commented 8 years ago

I think is best to keep a separated repo for all plugins as we did with leaflet. If i have time, will include the ones you guys want me to add.