Add option to geoJson to set viewCoords
- Dominant language
- TypeScript
- Stars
- 67.3k
- Forks
- 19.8k
- Avg merge
- 11d 14h
- Merged PRs (30d)
- 8
Description
### What problem does this feature solve?
Currently eCharts allow to set boundingBox, however zoom and pan are not working outside of the boundingCoords. The goal is to open chart that is always fitting the desired area, yet allowing to move freely around the geoJson map.
### What does the proposed API look like?
```
viewCoords: [
// [lng, lat] of left-top corner
[-180, 90],
// [lng, lat] of right-bottom corner
[180, -90]
]
```
Appreciate @helgasoft for cross referencing two issues, however, the workaround is not a viable solution. If eCharts insists on locking out the map outside of the bounding coordinates, then there should restriction for a user to only pan and zoom within the bounding box. Right now that behavior is not performing, **moving mouse outside of the browser of div will continue to move map, leaving user locked out if they want to try to use it again.**
Adding viewCoords will not restrict the use of map and will allow user to navigate around. However, **the most important part**, on chart load or data refresh, the focus of the map will be where the data is.
Contributor guide
Assessment
This issue has not been assessed yet.