Disable zoom control buttons?
See original GitHub issueIs it possible to disable the zoom control buttons?
On zoomend
I perform a request to the backend for data.
I can disable touchZoom
, scrollWheelZoom
, doubleClickZoom
and boxZoom
on the map but I can’t see any way to disable the zoom control buttons ([+]
and [-]
) because the user is still currently able to click these to change the zoom whilst data for the previous zoom level is still being requested from the database.
I want to prevent further zoom changes to the map whilst the data is being requested.
Is there a way to disable the zoom control buttons without just making them visibility: hidden
, then visibility: visible
again when the data has been returned from the database?
I have the same callback function for dragend
but just disabling dragging
on the map seems to be working fine for this.
Thanks
Issue Analytics
- State:
- Created 9 years ago
- Reactions:1
- Comments:9 (5 by maintainers)
Top GitHub Comments
@amnesia7 try
map.zoomControl.enable()
anddisable()
in master version now!@ignacio82 That looks like a Leaflet + R question.
However, this issue tracker is used for reporting bugs and discussing new features for leaflet only, not Leaflet+R. For questions on using Leaflet, please use gis.stackexchange.com or stackoverflow.