[GIS] Disable double click zoom event in Leaflet for R

leafletrshinyzoom

Is there a way to disable the double click zoom in Leaflet for R?

I've created a Shiny app that changes polygon styles when a country's region is clicked on/off. If you select and immediately deselect the same polygon, the map zooms in. I want to disable this feature so that there's no wonky zooming!

According to leaflet.js documentation, you can disable this feature in JavaScript. Leaflet for R refers to this documentation when I try to search for the solution within R, which is completely unhelpful.

Best Answer

There is the option doubleClickZoom = FALSE :

leaflet(data,options = leafletOptions(doubleClickZoom= FALSE)) %>% ...

Other options can be found here : Disable leaflet interaction temporary