arcgis api for js 3.21如何禁止缩放和拖动地图

如题,如何禁止地图拖动缩放,在map中设置了几个属性,没起作用,有没有用过的指点一下。
已邀请:

谢军

赞同来自: 夏天D

监听map对象的load事件,在其回调函数中调用map.disablePan()/map.disableScrollWheelZoom()等方法。如:https://jsbin.com/cihipotuju/edit?html,output

谢峥

赞同来自:

 //禁止地图缩放与拖拽
 this.InteractionOptions = new MapViewInteractionOptions() { IsZoomEnabled = false, IsPanEnabled = false };
 this是MapView
 .net的代码希望对你有帮助
 
 

要回复问题请先登录注册