From 079a36c1de79e824b260f19c840d4b2066cf11b4 Mon Sep 17 00:00:00 2001 From: evlist Date: Tue, 29 Nov 2022 22:38:08 +0100 Subject: [PATCH] Finding the moveTolerance option (great improvement with touch screens). --- src/components/map/Map.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/map/Map.tsx b/src/components/map/Map.tsx index 0ee2758..b041f47 100644 --- a/src/components/map/Map.tsx +++ b/src/components/map/Map.tsx @@ -191,6 +191,7 @@ const Map: Component = () => { new Rotate(), new ScaleLine({ bar: true }), ]), + moveTolerance: 10, interactions: new Collection([ new DragRotate(), new DoubleClickZoom(), @@ -204,7 +205,7 @@ const Map: Component = () => { ]), }); olMap.on(['moveend'], changeListener); - olMap.on(['click'], clickHandler); + olMap.on(['singleclick'], clickHandler); setMap(olMap); setBranch('/', { vectorLayer: vectorLayer });