Finding the moveTolerance option (great improvement with touch screens).

This commit is contained in:
Eric van der Vlist 2022-11-29 22:38:08 +01:00
parent ca37281a0b
commit 079a36c1de
1 changed files with 2 additions and 1 deletions

View File

@ -191,6 +191,7 @@ const Map: Component = () => {
new Rotate(), new Rotate(),
new ScaleLine({ bar: true }), new ScaleLine({ bar: true }),
]), ]),
moveTolerance: 10,
interactions: new Collection<Interaction>([ interactions: new Collection<Interaction>([
new DragRotate(), new DragRotate(),
new DoubleClickZoom(), new DoubleClickZoom(),
@ -204,7 +205,7 @@ const Map: Component = () => {
]), ]),
}); });
olMap.on(['moveend'], changeListener); olMap.on(['moveend'], changeListener);
olMap.on(['click'], clickHandler); olMap.on(['singleclick'], clickHandler);
setMap(olMap); setMap(olMap);
setBranch('/', { vectorLayer: vectorLayer }); setBranch('/', { vectorLayer: vectorLayer });