| | |
| | | // this.map.extend(Cesium.viewerDragDropMixin); |
| | | this.map.scene.globe.depthTestAgainstTerrain = false; |
| | | this.map.scene.logarithmicDepthBuffer = false; |
| | | this.map.scene.globe.baseColor = Cesium.Color.WHITESMOKE ; |
| | | this.map.scene.globe.baseColor = Cesium.Color.BLACK; |
| | | window.viewer = this.map; |
| | | window.dcViewer = dcViewer; |
| | | var imageryLayers = this.map.imageryLayers; |
| | | imageryLayers.removeAll(); |
| | | |
| | | |
| | | var yinyan = new Cesium.WebMapTileServiceImageryProvider({ |
| | | "label": "天地图影像", |
| | | "type": "wmts", |
| | | "url": "http://t0.tianditu.gov.cn/img_w/wmts?tk=e9533f5acb2ac470b07f406a4d24b4f0", |
| | | "layer": "img", |
| | | "style": "default", |
| | | "format": "tiles", |
| | | "tileMatrixSetID": "w", |
| | | "maximumLevel": 17 |
| | | }); |
| | | dcViewer.hawkeyeMap.enable = true |
| | | dcViewer.hawkeyeMap.addBaseLayer( |
| | | yinyan |
| | | ) |
| | | |
| | | // // 罗盘 |
| | | // this.map.extend(Cesium.viewerCesiumNavigationMixin); |
| | |
| | | } |
| | | 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); |