| | |
| | | else if (layerConfig.type == "wmts") { |
| | | layer = new Cesium.WebMapTileServiceImageryProvider(layerConfig); |
| | | } |
| | | else if (layerConfig.type == "gg") { |
| | | layer = DC.ImageryLayerFactory.createGoogleImageryLayer() |
| | | } |
| | | else if (layerConfig.type == "baidu") { |
| | | layer = DC.ImageryLayerFactory.createBaiduImageryLayer() |
| | | |
| | | } |
| | | else if (layerConfig.type == "gaod") { |
| | | layer = DC.ImageryLayerFactory.createAmapImageryLayer() |
| | | } |
| | | else if (layerConfig.type == "tenx") { |
| | | |
| | | layer = DC.ImageryLayerFactory.createTencentImageryLayer() |
| | | |
| | | } |
| | | else if (layerConfig.type == "gis") { |
| | | layer = DC.ImageryLayerFactory.createArcGisImageryLayer({ |
| | | url: |
| | | 'http://cache1.arcgisonline.cn/arcgis/rest/services/SimpleFeature/ChinaBoundaryLine/MapServer' |
| | | }) |
| | | } |
| | | else if (layerConfig.type == "mapbox") { |
| | | layer = new Cesium.MapboxImageryProvider({ |
| | | mapId: 'mapbox.country-boundaries-v1', |
| | | accessToken:'pk.eyJ1Ijoibm5uampqMTIzNDU2IiwiYSI6ImNraDV3YzJlYTFtdnEycmxxaXZpem1tM3cifQ.qaBhT3T_VTxXbeoRAVTkwg' |
| | | }) |
| | | } |
| | | layerArr.push(layer); |
| | | } |
| | | |
| | |
| | | // }); |
| | | // }), 100); |
| | | //无动画的 |
| | | setTimeout(lang.hitch(this,function(){ |
| | | this.map.camera.setView({destination:Cesium.Rectangle.fromDegrees(west, south, east, north)}); |
| | | }),100); |
| | | setTimeout(lang.hitch(this, function () { |
| | | this.map.camera.setView({ destination: Cesium.Rectangle.fromDegrees(west, south, east, north) }); |
| | | }), 100); |
| | | |
| | | //修改全局的homebutton定位 |
| | | Cesium.Camera.DEFAULT_VIEW_RECTANGLE = Cesium.Rectangle.fromDegrees(west, south, east, north); |