D
D
Dulin6662014-12-01 12:50:17
API
Dulin666, 2014-12-01 12:50:17

How to disable 'Touch' yandex maps?

tried to disable with behaviors
myMap.behaviors.disable(['drag','multiTouch']);
the block with the map cannot be scrolled by swipe

Answer the question

In order to leave comments, you need to log in

2 answer(s)
J
jlekapb, 2014-12-24
@jlekapb

what do you mean by touch?
this is how multitouch gestures are disabled:
this is how dragging a map:
map.behaviors.disable('drag');

L
lookfortheroot, 2019-06-24
@lookfortheroot

Better late than never. For future sufferers and nikolaybolonin - the block with the card should do this: and

.map * {
  touch-action: auto
}

and everything magically works. In other words, there will be scrolling the page with one finger, as expected, plus moving and zooming with two fingers.
For information, disable
map.behaviors.disable('drag');

on Android + Chrome/Firefox blocks page scrolling at all, but on iOS/Safari everything is fine (at the time of API 2.1)
I don’t know how Yandex tests their software, so it will remain on their conscience.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question