| | |
| | | './utils', |
| | | 'jimu/dijit/Message' |
| | | ], function (declare, lang, array, html, query, topic, on, aspect, keys, i18n, dojoConfig, |
| | | require, jimuUtils, |
| | | Message) { |
| | | require, jimuUtils, |
| | | Message) { |
| | | var instance = null, |
| | | clazz = declare(null, { |
| | | appConfig: null, |
| | |
| | | |
| | | }, |
| | | |
| | | _createMap: function (mode, appConfig) { |
| | | _createMap: function (mode, appConfig) { //创建地图js |
| | | |
| | | Cesium.Ion.defaultAccessToken = appConfig.cesiumToken; |
| | | |
| | |
| | | |
| | | this.map.scene.highDynamicRange = false; |
| | | this.map._cesiumWidget._creditContainer.style.display = "none"; |
| | | |
| | | |
| | | // console.log(this.map.scene) |
| | | this.map.scene.globe.depthTestAgainstTerrain = true; |
| | | 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; |
| | | var imageryLayers = this.map.imageryLayers; |
| | | imageryLayers.removeAll(); |
| | |
| | | topic.subscribe("gis/map/flyTo", lang.hitch(this, this.flyTo)); |
| | | this._processMapOptions(appConfig.map.mapOptions); |
| | | this._publishMapEvent(this.map); |
| | | window.viewer.scene.screenSpaceCameraController.maximumZoomDistance = 180000; |
| | | |
| | | // window.viewer.scene.screenSpaceCameraController.maximumZoomDistance = 180000; |
| | | |
| | | this.setMapHeight(this.map); |
| | | }, |
| | |
| | | layer = new Cesium.WebMapTileServiceImageryProvider(layerConfig); |
| | | } else if (layerConfig.type == "SuperMap") { |
| | | layer = new Cesium.SuperMapImageryProvider(layerConfig); |
| | | } else if (layerConfig.type == "arcgis") { |
| | | layer = new Cesium.ArcGisMapServerImageryProvider(layerConfig); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | layerArr.push(layer); |
| | | } |
| | | |
| | |
| | | }) |
| | | } |
| | | }), new Cesium.ProviderViewModel({ |
| | | name: "湾里地形", |
| | | tooltip: "30M地形", |
| | | name: "鄱阳湖地形", |
| | | tooltip: "由 普适科技 提供的鄱阳湖地区地形", |
| | | iconUrl: "images/basemaps/TerrainSTK.png", |
| | | creationFunction: function () { |
| | | return new Cesium.CesiumTerrainProvider({ |
| | | url: "/mt3D/data/dx", |
| | | url: "./dx/", |
| | | requestWaterMask: !0, |
| | | requestVertexNormals: !0 |
| | | requestVertexNormals: !0, |
| | | // isSct: true,//因坡度坡向添加 |
| | | }) |
| | | } |
| | | })]; |
| | | // var terrainProviderViewModels = mapconfig.map.terrainProviderViewModels; |
| | | // for (var i = 0; i < terrainProviderViewModels.length; i++) { |
| | | // var tp = null; |
| | | // if(terrainProviderViewModels[i].url==""){ |
| | | // tp = new Cesium.EllipsoidTerrainProvider({ |
| | | // ellipsoid: Cesium.Ellipsoid.WGS84 |
| | | // }) |
| | | // } |
| | | // else{ |
| | | // tp = new Cesium.CesiumTerrainProvider({url:terrainProviderViewModels[i].url,requestVertexNormals:true}); |
| | | // } |
| | | // var pvm = new Cesium.ProviderViewModel({ |
| | | // name: terrainProviderViewModels[i].name, |
| | | // tooltip: terrainProviderViewModels[i].tooltip, |
| | | // iconUrl: terrainProviderViewModels[i].iconUrl, |
| | | // creationFunction: function() { |
| | | // return tp; |
| | | // } |
| | | // }); |
| | | // terrainProviderViewModelsArr.push(pvm); |
| | | // } |
| | | |
| | | return terrainProviderViewModelsArr; |
| | | |
| | | }, |
| | | |
| | | flyTo: function (item) { |
| | |
| | | var roll = mapOptions.positionInfo.roll; |
| | | |
| | | setTimeout(lang.hitch(this, function () { |
| | | this.map.camera.setView({destination: Cesium.Rectangle.fromDegrees(west, south, east, north)}); |
| | | this.map.camera.setView({ |
| | | destination: Cesium.Rectangle.fromDegrees(west, south, east, north) |
| | | }); |
| | | }), 100); |
| | | |
| | | |