Open supportdesk-si opened 1 month ago
boundingCoords are not well explained in API. In addition of zooming to a predefined area, they also limit the mouse interaction with the map. Pan/zoom are disabled outside the rectangular boundary. Use geo.center and geo.zoom instead of geo.boundingCoords if you want to pan/zoom over the entire map. Demo
📌 please close issue if problem solved.
Version
5.5.1
Link to Minimal Reproduction
https://echarts.apache.org/examples/en/editor.html?c=map-usa-pie
Steps to Reproduce
Adding the following code to live sandbox will reproduce the effect
boundingCoords:[ [ -85.658363, 37.932836 ], [ -84.377731, 39.152745 ] ],
As suggested below, this locks out zoom and pan outside of the bounding area and it is recommended to use zoom and center.
geo.zoom
andgeo.center
are not a good recommendation.Explanation: By calculating
boundingCoords
one can set the map to include all data points into the view. Zoom is a relative measure which with current framework, can't be calculated to include all data points and make them fit into the view. That's the reason why other map solutions are using bounding coordinates to set view. This should be reconsidered or new option to be added such asviewCoords
to allow zoom to a specific part of the map.Current Behavior
After several clicks and pans, the map will lock, stop zoom and pan.
Expected Behavior
Continuously zoom and pan
Environment
Any additional comments?
No response