OpenLayers:什么时候点击平移?
OpenLayers: When is a click a pan?
OpenLayers (v3.0.1) 中有没有办法设置开始平移需要多少像素的阈值/容差 "dragging"?
我们的一些用户使用带有触摸屏设备和手写笔(笔)的地图来 select 特征和平移地图。现在有了手写笔,当它们 "click" 时,它们似乎会拖动几个像素并且地图会通过平移而不是 select/click 事件做出反应。
编辑:我正在为 "clicking"/"selecting" 使用 select 交互。
在 OpenLayers v4.2.0 中引入了一个新选项:
moveTolerance
: The minimum distance in pixels the cursor must move to be detected as a map move event instead of a click. Increasing this value can make it easier to click on the map.
变更日志说:
Some touch devices do not play well with OpenLayers's way of detecting clicks. To overcome this, a new moveTolerance
option was introduced, so users can override the 1 pixel threshold above which a touch-release sequence won't be considered a click any more.
https://openlayers.org/en/latest/apidoc/module-ol_Map-Map.html
OpenLayers (v3.0.1) 中有没有办法设置开始平移需要多少像素的阈值/容差 "dragging"?
我们的一些用户使用带有触摸屏设备和手写笔(笔)的地图来 select 特征和平移地图。现在有了手写笔,当它们 "click" 时,它们似乎会拖动几个像素并且地图会通过平移而不是 select/click 事件做出反应。
编辑:我正在为 "clicking"/"selecting" 使用 select 交互。
在 OpenLayers v4.2.0 中引入了一个新选项:
moveTolerance
: The minimum distance in pixels the cursor must move to be detected as a map move event instead of a click. Increasing this value can make it easier to click on the map.
变更日志说:
Some touch devices do not play well with OpenLayers's way of detecting clicks. To overcome this, a new
moveTolerance
option was introduced, so users can override the 1 pixel threshold above which a touch-release sequence won't be considered a click any more.
https://openlayers.org/en/latest/apidoc/module-ol_Map-Map.html