question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Disable zoom control buttons?

See original GitHub issue

Is 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:closed
  • Created 9 years ago
  • Reactions:1
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
mournercommented, Jan 27, 2015

@amnesia7 try map.zoomControl.enable() and disable() in master version now!

0reactions
IvanSanchezcommented, Apr 21, 2016

@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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

LeafletJS: How to remove the zoom control - Stack Overflow
The documentation says there's a zoomControl option that will remove the zoom control from the map but I've had no luck in getting...
Read more >
Zoom Rooms meeting controls and settings
Zoom Rooms in-meeting controls appear on your controller. ... Allow Participants to: Enable or disable the following features for all ...
Read more >
Remove the Leaflet zoom control on mobile
zoomControl : Whether a zoom control is added to the map by default. This control is unnecessary on a mobile device, where the...
Read more >
How to remove zoom buttons on Android webview - YouTube
How to remove zoom buttons on Android webview, How to hide zoom buttons on webview, remove zoom buttons in webview,enable/ disable zoom in ......
Read more >
How do i remove the zoom control button on the xamarin ...
5.6K subscribers in the xamarindevelopers community. A space for Xamarin developers to ask questions or discuss their latest projects.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found