Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable map zoom on CircleMarker double click in leaflet

Tags:

People also ask

How do you turn off zoom in leaflet?

Zoom − By default, this control exists at the top left corner of the map. It has two buttons "+" and "–", using which you can zoom-in or zoom-out the map. You can remove the default zoom control by setting the zoomControl option of the map options to false.


I'm trying to disable the zoom on the map when I click in a CircleMarker object, but until now, no success.

This is my code:

var myCircle = new L.CircleMarker(new L.LatLng(50.924480, 10.758276), 10).addTo(map);
myCircle.on("click", function () {
    //my click stuff
});
myCircle.on("dblclick", function () {
    //my dblclick stuff
});

Everytime the dblclick event is fired, the map is zoomed, how to disable it?