Search code examples
chartsmapsgoogle-maps-markerspie-chart

Pie charts clustering on Google Maps [batchgeo-like]


Anybody knows how to remake something similar to what Batchgeo does when clusters/groups markers with dynamic pie charts?

Example: batchgeo map with pie clustering

Thanks,

Regards


Solution

  • I don't have a full how to for you, but do have some pointers which might help you and appear to be used by BatchGeo.

    I would study the cluster example on Google maps: https://developers.google.com/maps/articles/toomanymarkers

    Which covers clustering pretty well... then you would need to look at changing the marker image to a call to Google Charts: https://developers.google.com/chart/image/docs/gallery/pie_charts

    Note: this is deprecated and will drop support 2015... but is used by BatchGeo I believe.

    There is also an example here that might help get you on your way with the custom cluster marker images, which I can't post (as limited to 2 links) (such as the Hearts, People etc... set in CLUSTER STYLE). If you Google 'google map v3 cluster example' you should find it in the top results.

    If you put all that together then I think you should get there.

    Regards,

    James