apache / echarts

Apache ECharts is a powerful, interactive charting and data visualization library for browser
https://echarts.apache.org
Apache License 2.0
60.1k stars 19.6k forks source link

[Feature] Map Marker Clustering #19554

Open drush opened 7 months ago

drush commented 7 months ago

What problem does this feature solve?

When plotting lat/lon locations on maps, the density of points and information that can be discerned by the chart is affecting by the level of zoom. Marker Clusters allow the point counts to be displayed at large zoom levels and individual locations to be shown at small (close) zoom levels.

This feature is readily available with Google Charts but appears to be missing from echarts.

https://developers.google.com/maps/documentation/javascript/marker-clustering

screenshot-Marker Clustering    Maps JavaScript API    Google for Developers-Safari-2024-01-25

What does the proposed API look like?

It is possible to implement this as a transform, or possibly as a standalone data-preprocessing function. It is important to note that the zoom level is a consideration in how the data is processed and needs to be incorporated and accessible. The Google implementation now supports several different algorithms and is licensed under the Apache 2.0 license. https://github.com/googlemaps/js-markerclusterer/tree/main

Ovilia commented 7 months ago

This should be a useful feature to have. Since Google Maps support this feature, an easy way to do is to make a pull request to a Google Maps ECharts Extension like echarts-extension-gmap.