TwoFingersTouchZoomRotateHandler
定义于: src/ui/handler/shim/two_fingers_touch.ts:13
TwoFingersTouchZoomRotateHandler
允许用户通过在触摸屏上捏合手势来缩放和旋转地图。
用户也可以通过双击并拖动一根手指来缩放。在第二次点击时,按住手指并上下拖动来放大或缩小。
方法
disable()
disable():
void
定义于: src/ui/handler/shim/two_fingers_touch.ts:58
禁用"捏合旋转和缩放"交互。
返回
void
示例
map.touchZoomRotate.disable();
disableRotation()
disableRotation():
void
定义于: src/ui/handler/shim/two_fingers_touch.ts:94
禁用"捏合旋转"交互,但保持"捏合缩放"交互启用。
返回
void
示例
map.touchZoomRotate.disableRotation();
disableZoom()
disableZoom(): void
定义于: src/ui/handler/shim/two_fingers_touch.ts:118
禁用"两指缩放"交互,保留"两指旋转"交互;
返回
void
示例
map.touchZoomRotate.disableZoom();
enable()
enable(
options?
:boolean
| AroundCenterOptions):void
定义于: src/ui/handler/shim/two_fingers_touch.ts:43
启用"捏合旋转和缩放"交互。
参数
参数 | 类型 | 描述 |
---|---|---|
options? | boolean | AroundCenterOptions | 选项对象。 |
返回
void
示例
map.touchZoomRotate.enable(); map.touchZoomRotate.enable({ around: 'center' });
enableRotation()
enableRotation():
void
定义于: src/ui/handler/shim/two_fingers_touch.ts:108
启用"捏合旋转"交互。
返回
void
示例
map.touchZoomRotate.enable(); map.touchZoomRotate.enableRotation();
enableZoom()
enableZoom(): void
定义于: src/ui/handler/shim/two_fingers_touch.ts:129
启用"两指缩放"交互;
返回
void
示例
map.touchZoomRotate.enableZoom();
isActive()
isActive():
boolean
定义于: src/ui/handler/shim/two_fingers_touch.ts:81
如果处理程序已启用并且检测到缩放/旋转手势的开始,则返回true。
返回
boolean
如果处理程序处于活动状态,则为true
,否则为false
isEnabled()
isEnabled():
boolean
定义于: src/ui/handler/shim/two_fingers_touch.ts:70
返回一个布尔值,指示"捏合旋转和缩放"交互是否已启用。
返回
boolean
如果"捏合旋转和缩放"交互已启用,则为true
。
isRotationEnabled()
isRotationEnabled(): boolean
定义于: src/ui/handler/shim/two_fingers_touch.ts:184
返回一个布尔值,表示"两指旋转"交互是否已启用;
返回
boolean
如果"两指旋转"交互已启用,则返回true
;
isZoomEnabled()
isZoomEnabled(): boolean
定义于: src/ui/handler/shim/two_fingers_touch.ts:173
返回一个布尔值,表示"两指缩放"交互是否已启用;
返回
boolean
如果"两指缩放"交互已启用,则返回true
;