首页 / 浏览问题 / 云GIS / 问题详情
map的restrictedExtent属性对zoomToExtent方法有影响
106EXP 2019年11月25日

使用产品:supermap-iserver-9.1.1a-win64-zip

问题描述:当地图map设置了restrictedExtent属性后,再使用map.zoomToExtent()方法,会产生影响,造成地图缩放范围不准确。

代码:设置map范围:let bounds = new SuperMap.Bounds(-180,-90,180,90);
                                  map.restrictedExtent = bounds;

          地图缩放到指定范围:map.zoomToExtent();

问题图片:

正确图片:问题图片:

1个回答

你好,因为设置restrictedExtent,它本身就限制了地图的显示以及缩放的区域,也不能移出相关的区域。

3,352EXP 2019年11月25日
...