V
V
Valentin Popov2016-10-14 10:19:03
JavaScript
Valentin Popov, 2016-10-14 10:19:03

How to activate scroll after clicking on the map?

How to make it so that the user can scale the Yandex map only after clicking on it and then clicking on it again, the scroll is activated, but the map is not scaled.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
F
forgotten, 2016-10-14
@forgotten

map.events.once('click', function () {
    map.behaviors
        .enable('scrollZoom')
        .enable('multiTouch');
});

https://tech.yandex.ru/maps/doc/jsapi/2.1/dg/conce...

D
Dmitry, 2016-10-14
@thewind

Put a transparent div on top of the map and when you click on it, hide it. I don't think it will work back.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question