Finding the moveTolerance option (great improvement with touch screens).
This commit is contained in:
parent
ca37281a0b
commit
079a36c1de
|
@ -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 });
|
||||||
|
|
Loading…
Reference in New Issue