您好,可以设置地图的maxScale和minScale,同样的可以设置minZoom和maxZoom这两个属性。
var map, layer, host = window.isLocal ? window.server : "http://support.supermap.com.cn:8090", url = host + "/iserver/services/map-world/rest/maps/World"; //初始化地图 map = new SuperMap.Map("map", { controls: [ new SuperMap.Control.Navigation(), new SuperMap.Control.Zoom()] }); map.addControl(new SuperMap.Control.MousePosition()); map.minScale=1/1000000; //初始化图层 layer = new SuperMap.Layer.TiledDynamicRESTLayer("World", url, null, {maxResolution: "auto"}); //监听图层信息加载完成事件 layer.events.on({"layerInitialized": addLayer}); function addLayer() { map.addLayer(layer); //显示地图范围 map.setCenter(new SuperMap.LonLat(0, 0), 0); }