Sometimes, we want to remove the zoom control with LeafletJS.
In this article, we’ll look at how to remove the zoom control with LeafletJS.
How to remove the zoom control with LeafletJS?
To remove the zoom control with LeafletJS, we can set the zoomControl
option to false
.
For instance, we write
const map = new L.map("map", { zoomControl: false });
to create a map with the L.map
function.
We call it with an object with the zoomControl
property set to false
to remove the zoom control from the map.
Conclusion
To remove the zoom control with LeafletJS, we can set the zoomControl
option to false
.