echarts icon indicating copy to clipboard operation
echarts copied to clipboard

[Question] How to load and use country-level GeoJSON maps in ECharts?

Open prakhar-nigam70 opened this issue 8 months ago • 2 comments

Hi team 👋

I'm building an ECharts-based map interface in a React app and looking for guidance on how to:

  1. Get the appropriate GeoJSON files (e.g., for countries like India or the USA). Is there a way we can fetch GeoJSON files dynamically, from a source that provides it for all countries?
  2. Dynamically load these into the chart
  3. Add mappoint series for city markers (based on lat/lon)
  4. Optionally implement clustering based on zoom

I came across the echarts-countries-js package, which seems useful — but I wasn't sure if that's the recommended approach or if there's an official source for GeoJSON files.

Are there any example implementations (e.g., on CodeSandbox/CodePen) that I could look at?

Thanks a lot in advance for any help 🙏

Summary:

  1. Where to find the official or recommended GeoJSON files for different countries?
  2. How to load these GeoJSON files dynamically (e.g., on zoom or click)?
  3. Are there any examples (like on CodeSandbox or CodePen) that show:
  • Loading GeoJSON dynamically
  • Adding map points
  • Possibly clustering markers based on zoom

prakhar-nigam70 avatar Apr 02 '25 18:04 prakhar-nigam70

Asking "how to" or "usage" questions or requesting detailed debugging help is discouraged by the official posting guidelines:


The issue list is reserved exclusively for bug reports and feature requests. For usage questions, please use the following resources:


Marker clustering is a feature that has been mentioned before in #19554. In certain cases it could be substituted with heatmap

helgasoft avatar Apr 04 '25 17:04 helgasoft

Asking "how to" or "usage" questions or requesting detailed debugging help is discouraged by the official posting guidelines:

The issue list is reserved exclusively for bug reports and feature requests. For usage questions, please use the following resources:

Marker clustering is a feature that has been mentioned before in #19554. In certain cases it could be substituted with heatmap

Can we seek help from developers to support the map aggregation function? Thank you very much

xiyuvi avatar Jun 17 '25 02:06 xiyuvi