Made a few changes to allow a basic implementation of MarkerClusterer. In order to do this the following has been done:
Added an onCreate callback to child components to callback to the GMaps component
In the callback we check if the child is a "Marker" and then add it to the static "markers" array
In the "createMap" method we call MarkerClusterer with our Map entity and Markers array
There are still improvements that can be made, this are the mains ones I could think of at this time:
Currently no events are implemented on the MarkerClusterer - most importantly onClick would be handy
Adding/removing a marker after the map has been created will not update the MarkerClusterer instance
Implementing something to allow 'de-clustering' would be very helpful - for example if you have 5 markers with the exact same location you would have a 'cluster' with the number 5 on it, when events are implement the onClick event would be for the whole cluster, it would be ideal to have the cluster 'split' on first click so you can then click the correct one of 5 markers
Made a few changes to allow a basic implementation of MarkerClusterer. In order to do this the following has been done:
There are still improvements that can be made, this are the mains ones I could think of at this time: