A
A
Alexander Shtang2016-01-13 09:18:13
OpenStreetMap
Alexander Shtang, 2016-01-13 09:18:13

What is the way to prevent openstreetmap rescaling under leafletjs (not mapbox)?

Google Maps has one, Yandex.Maps has another (and mapbox has "zoomControl: false")... What about Openstreetmap?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Edward, 2016-01-13
@Enclave88

There is a prettier solution:

touchZoom = false
scrollWheelZoom = false
doubleClickZoom = false

leafletjs.com/reference.html#map-touchzoom
That is, it will be something like this:
var map = L.map('map', {
    touchZoom = false,
    scrollWheelZoom = false,
    doubleClickZoom = false
});

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question