web开发,叠加了天地图底图图层之后,地图只能放大到一定层级,但是其他图层的数据需要继续放大才能显现完整,看的清楚,请问需要如何解决?
if (!map) {
//TODO:利用浏览器单线程工作的特性,保证setTimeout中的代码在re-draw完成之后执行。
setTimeout(function(){
map = new SuperMap.Map("mapContainer2D");
map.addControl(new SuperMap.Control.MousePosition());
map.allOverlays = true;
map.maxZoom =25;
var supScene=URL_CONFIG.SupScene;
tiandituLayer = new SuperMap.Layer.WMTS({
name: "vec",
url: "http://t0.tianditu.com/vec_c/wmts?tk=1d109683f4d84198e37a38c442d68311",
layer: "vec",
style: "default",
matrixSet: "c",
format: "tiles",
opacity: 1,
requestEncoding: "KVP"
});
tianMarkerLayer = new SuperMap.Layer.WMTS({
name: "vec",
url: "http://t0.tianditu.com/cva_c/wmts?tk=1d109683f4d84198e37a38c442d68311",
layer: "cva",
style: "default",
matrixSet: "c",
format: "tiles",
opacity: 1,
requestEncoding: "KVP"
});
tianMarkerLayer.layerType = "cva";
tianMarkerLayer.isLabel = true;
for (var i=0;i<supScene.length;i++) {
if (supScene[i].GWServerUrl) {
layer = new SuperMap.Layer.TiledDynamicRESTLayer("Map", supScene[i].MapSerUrl, {
transparent: true, cacheEnabled: true
}, {maxResolution: "auto"});
layer.events.on({"layerInitialized": addLayer});
break;
}
}
}, 100);
}
function addLayer() {
map.addLayers([tiandituLayer, layer, tianMarkerLayer]);
map.addLayers([layer]);
map.setCenter(new SuperMap.LonLat(URL_CONFIG.mapCenter), 0);
//添加地图监听事件
if (layer != undefined) {
that.props.onChange({map: map});
}
};