Finding the moveTolerance option (great improvement with touch screens).
This commit is contained in:
1 parent
ca37281a0b
commit
079a36c1de
1 file changed
+2
-1
@@ -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 });
|
||||||
|
|||||||
Reference in new issue
Block a user