AI 地图
产品服务
解决方案
文档与支持
定价
更新时间: 2026/08/19 09:54

地图组件和 INativeMapContext 均可控制手势与控件。组件属性 zoomGesturesEnabled、moveGesturesEnabled、rotateGesturesEnabled、overlookingGesturesEnabled 用于初始状态;运行时可调用同名 Context 方法动态切换。showScaleControl、showZoomControls 和 showCompass 分别控制比例尺、缩放控件和指南针。

运行时控制
map?.zoomGesturesEnabled(true)
map?.moveGesturesEnabled(true)
map?.rotateGesturesEnabled(true)
map?.overlookingGesturesEnabled(true)
map?.showCompass(true)
页面配置示例
<baidumap-view id="demoMap"
:zoomGesturesEnabled="true" :moveGesturesEnabled="true"
:rotateGesturesEnabled="false" :overlookingGesturesEnabled="false" />

如果页面需要固定视角,可关闭旋转或俯视手势;如果地图用于导航或浏览,通常保留拖动和缩放手势。

上一篇

地图状态与图层

下一篇

事件交互
本篇文章对您是否有帮助?