map = new SuperMap.Map("mapDiv", {
controls : [ new SuperMap.Control.LayerSwitcher(), new SuperMap.Control.Navigation({
dragPanOptions : {
enableKinetic : true
}
}), new SuperMap.Control.OverviewMap(), new SuperMap.Control.ScaleLine(), new SuperMap.Control.MousePosition() ],
allOverlays : true
});
layer1 = new SuperMap.Layer.TiledDynamicRESTLayer("底图", map1Url, {
transparent : true,
cacheEnabled : true
}, {
maxResolution : "auto", bufferImgCount: 0
});
layer2 = new SuperMap.Layer.TiledDynamicRESTLayer("标注", map2Url, {
transparent : true,
cacheEnabled : true
},{
maxResolution : "auto", bufferImgCount: 0
});
layer1.events.on({"layerInitialized":addLayer2});
function addLayer2() {
map.addLayers([layer1,layer2]);
map.setCenter(new SuperMap.LonLat(-9739617.97271,14555886.38423),7);
}