apache / apache/echarts

Compatibility Issue with Mapbox in React using ECharts

Open
#20,714 0 comments 0 reactions 0 assignees View on GitHub
en new-feature pending
Dominant language
TypeScript
Stars
67.3k
Forks
19.8k
Avg merge
11d 14h
Merged PRs (30d)
8

Description

Integrating ECharts with Mapbox in React applications is not working as expected. Despite configuring geo.map with mapbox, the map does not render properly or fails silently. The lack of compatibility makes it difficult to create advanced map visualizations with Mapbox and ECharts in React environments

### **Steps to Reproduce**
1. Install `echarts` and `mapbox-gl`.
2. Use the following `geo` configuration in an ECharts option:
```jsx
geo: {
map: 'mapbox',
mapbox: {
style: 'mapbox://styles/mapbox/streets-v11',
center: [-95.7129, 37.0902],
zoom: 3,
},
},
series: [
{
type: 'scatter',
coordinateSystem: 'geo',
data: [[-95.7129, 37.0902]],
symbolSize: 10,
},
],
```
3. Render the chart in a React component using `echarts-for-react`.
4. Mapbox map does not render and produces errors in the console.

---

Mapbox integration with ECharts is either broken or not functioning properly in React applications.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.