Disable centering of overviewmap control
See original GitHub issueIs your feature request related to a problem? Please describe.
I am trying to customize the OverviewMap control, such that the overviewmap remains fixed (i.e., doesn’t zoom, shift, or rotate) when a user interacts with the main map.
The constructor of OverviewMap
provides the rotateWithView
parameter to enable/disable rotation of the overviewmap. It’s also possible to prevent zooming of the overview map, by only providing a single layer via layers
. However, it doesn’t seem to be possible to disable re-centering (OverviewMap.recenter_()].
Describe the solution you’d like
I propose adding a center
parameter to the constructor of OverviewMap
(true
by default), which when set to false
would disable centering of the overviewmap relative to the box. In other words, I would like the box to move and the overviewmap to remain static.
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (4 by maintainers)
Top GitHub Comments
@hackermd Please open a new issue for this. A short self-contained example would be helpful to reproduce this.
Does this work?
Not tested.