FAQ: 地图平移工具在firefox和ie下表现不同

文章编号: 458
软件: ArcGIS Server 9.3.1
操作系统: N/A
已邀请:

EsriSupport

赞同来自:

问题:
模板程序在Firefox下的平移工具,当鼠标超出地图范围时,平移操作的鼠标指针发生了变化,但是地图移动仍然继续。这时候如果在地图范围之外释放鼠标左键,此时平移工具仍处于活跃状态,即漫游操作不会结束。当鼠标移回到地图上时,不按任何键,地图也在移动。但是在IE7下面是正常的,鼠标即使在地图范围之外释放,漫游操作也会结束。
回答: 解决办法:打开esri_map.js,找到以下代码:
function EsriMapContinuousPan(id, toolName) { this.inheritsFrom(new EsriMapToolItem(id, toolName, new EsriDragElementAction(true)));
修改为:
function EsriMapContinuousPan(id, toolName) { this.inheritsFrom(new EsriMapToolItem(id, toolName, new EsriDragElementAction(true,true)));
第二个参数true表示禁止漫游的鼠标活动到地图范围之外。





创建时间:2009-07-07
最近更新:2009-07-07


原文链接
http://support.esrichina.com.cn/2009/0707/458.html

要回复问题请先登录注册