|
@@ -183,18 +183,10 @@ export default {
|
|
|
let that = this;
|
|
|
that.m_handles = new Handles();
|
|
|
that.m_spatialReference = new SpatialReference(dojoConfig["spatialReference"]);
|
|
|
- if (that.mapTheme == 'dark_csj') {
|
|
|
- that.m_fullExtent = new Extent(dojoConfig["extent"]);
|
|
|
- that.m_scale = dojoConfig["scale"];
|
|
|
- } else {
|
|
|
- that.m_fullExtent = new Extent(dojoConfig["extent"]);
|
|
|
- that.m_scale = dojoConfig["initScale"];
|
|
|
- }
|
|
|
- // that.m_fullExtent = new Extent(dojoConfig["extent"]);
|
|
|
+ that.m_fullExtent = new Extent(dojoConfig["extent"]);
|
|
|
that.m_initialExtent = new Extent(dojoConfig["initExtent"]);
|
|
|
that.m_initialExtent.spatialReference = that.m_spatialReference;
|
|
|
that.m_fullExtent.spatialReference = that.m_spatialReference;
|
|
|
- debugger
|
|
|
await that.initMapByConfig();
|
|
|
})
|
|
|
},
|
|
@@ -211,19 +203,7 @@ export default {
|
|
|
'esri/core/watchUtils'
|
|
|
]).then(async ([Map, GraphicsLayer, SceneView, MapView, SketchViewModel, esriConfig, urlUtils, watchUtils]) => {
|
|
|
//跨域设置(部分图层ip属于别人的)
|
|
|
-
|
|
|
- //esriConfig.request.proxyUrl = "http://localhost:8080/dotnet_cim/proxy.ashx";
|
|
|
- // urlUtils.addProxyRule({
|
|
|
- // proxyUrl:"http://localhost:8080/dotnet_cim/proxy.ashx",
|
|
|
- // urlPrefix:"http://www.smi.sh.cegn.cn"
|
|
|
- // })
|
|
|
- //esriConfig.request.proxyUrl = "http://10.81.66.1:8080/dotnet_cim/proxy.ashx";
|
|
|
- // urlUtils.addProxyRule({
|
|
|
- // proxyUrl: "http://10.81.66.1:8080/dotnet_cim/proxy.ashx",
|
|
|
- // urlPrefix: "http://www.smi.sh.cegn.cn"
|
|
|
- // })
|
|
|
- // this.m_token_map = this.getToken_map(dojoConfig["host1"], dojoConfig["username1"], dojoConfig["password1"]);
|
|
|
-
|
|
|
+ debugger
|
|
|
this.m_map = new Map({});
|
|
|
this.m_sketchLayer = new GraphicsLayer({
|
|
|
id: "sketchLayer",
|
|
@@ -272,8 +252,8 @@ export default {
|
|
|
container: "viewDiv",
|
|
|
map: this.m_map,
|
|
|
logo: false,
|
|
|
- viewingMode: "global",
|
|
|
- scale:this.m_scale,
|
|
|
+ viewingMode: "local",
|
|
|
+ extent:this.m_initialExtent,
|
|
|
spatialReference: this.m_spatialReference,
|
|
|
qualityProfile: "high",
|
|
|
environment: {
|
|
@@ -287,11 +267,11 @@ export default {
|
|
|
atmosphere: {
|
|
|
quality: "high"
|
|
|
},
|
|
|
- lighting: {
|
|
|
- date: new Date().setHours(-3),
|
|
|
- directShadowsEnabled: true,
|
|
|
- cameraTrackingEnabled: true
|
|
|
- }
|
|
|
+ // lighting: {
|
|
|
+ // date: new Date().setHours(-3),
|
|
|
+ // directShadowsEnabled: true,
|
|
|
+ // cameraTrackingEnabled: true
|
|
|
+ // }
|
|
|
},
|
|
|
});
|
|
|
}
|
|
@@ -301,8 +281,8 @@ export default {
|
|
|
//监听最大比例尺
|
|
|
this.m_view.watch("scale", () => {
|
|
|
let scale = this.m_view.scale;
|
|
|
- if (scale > 5000000) {
|
|
|
- this.m_view.scale = 5000000;
|
|
|
+ if (scale > 1000000) {
|
|
|
+ this.m_view.scale = 1000000;
|
|
|
}
|
|
|
})
|
|
|
|
|
@@ -313,39 +293,6 @@ export default {
|
|
|
let camera = this.m_view.camera;
|
|
|
let rotation = this.m_view.viewpoint.rotation;
|
|
|
let center = this.m_view.center;
|
|
|
- let _center = {};
|
|
|
- if (center.x > 150000) {
|
|
|
- _center = {
|
|
|
- x: 150000,
|
|
|
- y: center.y,
|
|
|
- z: center.z
|
|
|
- };
|
|
|
- this.setCenter(_center);
|
|
|
- }
|
|
|
- if (center.x < -150000) {
|
|
|
- _center = {
|
|
|
- x: -150000,
|
|
|
- y: center.y,
|
|
|
- z: center.z
|
|
|
- }
|
|
|
- this.setCenter(_center);
|
|
|
- }
|
|
|
- if (center.y > 120000) {
|
|
|
- _center = {
|
|
|
- x: center.x,
|
|
|
- y: 120000,
|
|
|
- z: center.z
|
|
|
- }
|
|
|
- this.setCenter(_center);
|
|
|
- }
|
|
|
- if (center.y < -120000) {
|
|
|
- _center = {
|
|
|
- x: center.x,
|
|
|
- y: -120000,
|
|
|
- z: center.z
|
|
|
- }
|
|
|
- this.setCenter(_center);
|
|
|
- }
|
|
|
that.$bus.$emit('SendMessage', {
|
|
|
action: "MapExtentChanged",
|
|
|
data: {
|
|
@@ -462,36 +409,30 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}.bind(this))
|
|
|
- debugger
|
|
|
- if (this.mapTheme == 'dark'||this.mapTheme == 'dark_zdb') {
|
|
|
- //let darkUrl = await this.returnProxyUrl("https://cimweb.zjw.sh.cegn.cn:2008/MapProxyApi/getSceneServer/ptgl/93493321");
|
|
|
- this.setBackground({
|
|
|
- "opacity": 0.7,
|
|
|
- "color": "#002F47",
|
|
|
- })
|
|
|
- await this.addBaseMapLayer({
|
|
|
- "id": "BaseMap",
|
|
|
- "title": "BaseMap",
|
|
|
- "visible": true,
|
|
|
- "opacity": 1,
|
|
|
- "url": 'https://cimweb.zjw.sh.cegn.cn:2008/MapProxyApi/getSceneServer/ptgl/93493321',
|
|
|
- })
|
|
|
- } else if (this.mapTheme == 'light') {
|
|
|
- //let lightUrl = await this.returnProxyUrl("https://cimweb.zjw.sh.cegn.cn:2008/MapProxyApi/getSceneServer/ptgl/37072265");
|
|
|
+ if (this.mapTheme == 'light') {
|
|
|
this.setBackground({
|
|
|
"visible": true,
|
|
|
"opacity": 1,
|
|
|
"color": "#FFF",
|
|
|
})
|
|
|
- await this.addBaseMapLayer({
|
|
|
- "id": "BaseMap",
|
|
|
- "title": "BaseMap",
|
|
|
- "visible": true,
|
|
|
- "opacity": 1,
|
|
|
- "url": 'https://cimweb.zjw.sh.cegn.cn:2008/MapProxyApi/getSceneServer/ptgl/37072265',
|
|
|
- })
|
|
|
+ await this.addBaseMapLayer([
|
|
|
+ {
|
|
|
+ "id": "BaseMap",
|
|
|
+ "title": "BaseMap",
|
|
|
+ "visible": true,
|
|
|
+ "opacity": 1,
|
|
|
+ "url": 'https://mape.shanghai-map.net/arcgis/rest/services/SHMAP_D/MapServer',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "id": "BaseMapZJ",
|
|
|
+ "title": "BaseMapZJ",
|
|
|
+ "visible": true,
|
|
|
+ "opacity": 1,
|
|
|
+ "url": 'https://mape.shanghai-map.net/arcgis/rest/services/SHMAP_DZJ/MapServer',
|
|
|
+ }
|
|
|
+ ])
|
|
|
}
|
|
|
- debugger
|
|
|
+ // debugger
|
|
|
//地图创建完成
|
|
|
MapReady.resolve();
|
|
|
})
|
|
@@ -798,133 +739,48 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- async addBaseMapLayer(params){
|
|
|
+ async addBaseMapLayer(params) {
|
|
|
this.clearBaseMapLayer();
|
|
|
- let url = await this.returnProxyUrl(params.url);
|
|
|
- loadModules(['esri/Basemap',"esri/layers/TileLayer","esri/layers/SHCTiledNewLayer"])
|
|
|
- .then(([Basemap, TileLayer, SHCTiledNewLayer]) => {
|
|
|
- //获取参数
|
|
|
- debugger
|
|
|
- let id = params.id;
|
|
|
- let title = params.title;
|
|
|
- let visible = params.visible;
|
|
|
- let opacity = params.opacity;
|
|
|
- let type = "tile";
|
|
|
- if (params.type) {
|
|
|
- type = params.type;
|
|
|
- }
|
|
|
- let layer;
|
|
|
- let size = [512, 512];
|
|
|
- let origin = {
|
|
|
- "x": -66000,
|
|
|
- "y": 75000
|
|
|
- };
|
|
|
- switch (type) {
|
|
|
- case "tile":
|
|
|
- layer = new TileLayer({
|
|
|
- url: url,
|
|
|
- id: id,
|
|
|
- title: title,
|
|
|
- opacity: opacity,
|
|
|
- visible: visible,
|
|
|
- spatialReference: this.m_spatialReference,
|
|
|
- fullExtent: this.m_fullExtent,
|
|
|
- });
|
|
|
- break;
|
|
|
- case "shc_tile":
|
|
|
- this.m_token_map = this.getToken_map(dojoConfig["host1"], dojoConfig["username1"], dojoConfig["password1"]);
|
|
|
- layer = new SHCTiledNewLayer({
|
|
|
- url: url,
|
|
|
- id: id,
|
|
|
- title: title,
|
|
|
- visible: visible,
|
|
|
- opacity: opacity,
|
|
|
- fullExtent: this.m_fullExtent,
|
|
|
- spatialReference: this.m_spatialReference,
|
|
|
- origin: origin,
|
|
|
- size: size,
|
|
|
- lods: [
|
|
|
- {
|
|
|
- "level": 0,
|
|
|
- "resolution": 132.2919312505292,
|
|
|
- "scale": 500000
|
|
|
- }, {
|
|
|
- "level": 1,
|
|
|
- "resolution": 52.91677250021167,
|
|
|
- "scale": 200000
|
|
|
- }, {
|
|
|
- "level": 2,
|
|
|
- "resolution": 26.458386250105836,
|
|
|
- "scale": 100000
|
|
|
- }, {
|
|
|
- "level": 3,
|
|
|
- "resolution": 13.229193125052918,
|
|
|
- "scale": 50000
|
|
|
- }, {
|
|
|
- "level": 4,
|
|
|
- "resolution": 5.291677250021167,
|
|
|
- "scale": 20000
|
|
|
- }, {
|
|
|
- "level": 5,
|
|
|
- "resolution": 2.6458386250105836,
|
|
|
- "scale": 10000
|
|
|
- }, {
|
|
|
- "level": 6,
|
|
|
- "resolution": 1.3229193125052918,
|
|
|
- "scale": 5000
|
|
|
- }, {
|
|
|
- "level": 7,
|
|
|
- "resolution": 0.5291677250021167,
|
|
|
- "scale": 2000
|
|
|
- }, {
|
|
|
- "level": 8,
|
|
|
- "resolution": 0.26458386250105836,
|
|
|
- "scale": 1000
|
|
|
- }, {
|
|
|
- "level": 9,
|
|
|
- "resolution": 0.13229193125052918,
|
|
|
- "scale": 500
|
|
|
- }],
|
|
|
- lodsLevelMapping: {
|
|
|
- "0": 0,
|
|
|
- "1": 0,
|
|
|
- "2": 0,
|
|
|
- "3": 0,
|
|
|
- "4": 0,
|
|
|
- "5": 0,
|
|
|
- "6": 0,
|
|
|
- "7": 0,
|
|
|
- "8": 0,
|
|
|
- "9": 0,
|
|
|
- "10": 0,
|
|
|
- "11": 1,
|
|
|
- "12": 2,
|
|
|
- "13": 3,
|
|
|
- "14": 3,
|
|
|
- "15": 4,
|
|
|
- "16": 5,
|
|
|
- "17": 6,
|
|
|
- "18": 7,
|
|
|
- "19": 8,
|
|
|
- "20": 9,
|
|
|
- "21": 9,
|
|
|
- "22": 9,
|
|
|
- "23": 9
|
|
|
- }
|
|
|
- });
|
|
|
- if (params.chy_token == 'm_token') {
|
|
|
- layer.token = this.m_token_map;
|
|
|
- }
|
|
|
- break;
|
|
|
+ loadModules(['esri/Basemap', 'esri/layers/TileLayer'])
|
|
|
+ .then(async ([Basemap, TileLayer]) => {
|
|
|
+ // 创建一个数组来存储所有的图层
|
|
|
+ let layers = [];
|
|
|
+ // 遍历参数并创建图层
|
|
|
+ for (let i = 0; i < params.length; i++) {
|
|
|
+ let id = params[i].id;
|
|
|
+ let title = params[i].title;
|
|
|
+ let visible = params[i].visible;
|
|
|
+ let opacity = params[i].opacity;
|
|
|
+ let url = params[i].url;
|
|
|
+ let layer = await new TileLayer({
|
|
|
+ url: url,
|
|
|
+ id: id,
|
|
|
+ title: title,
|
|
|
+ opacity: opacity,
|
|
|
+ visible: visible,
|
|
|
+ // 如果需要,可以取消下面的注释
|
|
|
+ // spatialReference: this.m_spatialReference,
|
|
|
+ // fullExtent: this.m_fullExtent,
|
|
|
+ });
|
|
|
+ // 将图层添加到数组中
|
|
|
+ layers.push(layer);
|
|
|
}
|
|
|
+ // 创建一个新的 Basemap,并将图层数组添加进去
|
|
|
let basemap = new Basemap({
|
|
|
id: "basemap",
|
|
|
title: "底图",
|
|
|
- baseLayers: [layer]
|
|
|
+ baseLayers: layers
|
|
|
});
|
|
|
+ // 设置地图的 basemap
|
|
|
this.m_map.basemap = basemap;
|
|
|
- m_overview_map.basemap = this.m_map.basemap;
|
|
|
+ // 如果需要同步概览地图的 basemap
|
|
|
+ if (typeof m_overview_map !== 'undefined') {
|
|
|
+ m_overview_map.basemap = this.m_map.basemap;
|
|
|
+ }
|
|
|
})
|
|
|
+ .catch(err => {
|
|
|
+ console.error("Error loading modules: ", err);
|
|
|
+ });
|
|
|
},
|
|
|
clearBaseMapLayer(){
|
|
|
this.m_map.basemap = null;
|
|
@@ -1040,109 +896,6 @@ export default {
|
|
|
fullExtent: this.m_fullExtent,
|
|
|
});
|
|
|
break;
|
|
|
- case "shc_tile":
|
|
|
- this.m_token_map = this.getToken_map(dojoConfig["host1"], dojoConfig["username1"], dojoConfig["password1"]);
|
|
|
- if(params.size){
|
|
|
- size = params.size;
|
|
|
- }
|
|
|
- if(params.origin){
|
|
|
- origin = params.origin;
|
|
|
- }
|
|
|
- layer = new SHCTiledNewLayer({
|
|
|
- url: url,
|
|
|
- id: id,
|
|
|
- title: title,
|
|
|
- visible: visible,
|
|
|
- opacity: opacity,
|
|
|
- fullExtent: this.m_fullExtent,
|
|
|
- spatialReference: this.m_spatialReference,
|
|
|
- origin: origin,
|
|
|
- size: size,
|
|
|
- lods: [
|
|
|
- {
|
|
|
- "level": 0,
|
|
|
- "resolution": 132.2919312505292,
|
|
|
- "scale": 500000
|
|
|
- }, {
|
|
|
- "level": 1,
|
|
|
- "resolution": 52.91677250021167,
|
|
|
- "scale": 200000
|
|
|
- }, {
|
|
|
- "level": 2,
|
|
|
- "resolution": 26.458386250105836,
|
|
|
- "scale": 100000
|
|
|
- }, {
|
|
|
- "level": 3,
|
|
|
- "resolution": 13.229193125052918,
|
|
|
- "scale": 50000
|
|
|
- }, {
|
|
|
- "level": 4,
|
|
|
- "resolution": 5.291677250021167,
|
|
|
- "scale": 20000
|
|
|
- }, {
|
|
|
- "level": 5,
|
|
|
- "resolution": 2.6458386250105836,
|
|
|
- "scale": 10000
|
|
|
- }, {
|
|
|
- "level": 6,
|
|
|
- "resolution": 1.3229193125052918,
|
|
|
- "scale": 5000
|
|
|
- }, {
|
|
|
- "level": 7,
|
|
|
- "resolution": 0.5291677250021167,
|
|
|
- "scale": 2000
|
|
|
- }, {
|
|
|
- "level": 8,
|
|
|
- "resolution": 0.26458386250105836,
|
|
|
- "scale": 1000
|
|
|
- }, {
|
|
|
- "level": 9,
|
|
|
- "resolution": 0.13229193125052918,
|
|
|
- "scale": 500
|
|
|
- }],
|
|
|
- lodsLevelMapping: {
|
|
|
- "0": 0,
|
|
|
- "1": 0,
|
|
|
- "2": 0,
|
|
|
- "3": 0,
|
|
|
- "4": 0,
|
|
|
- "5": 0,
|
|
|
- "6": 0,
|
|
|
- "7": 0,
|
|
|
- "8": 0,
|
|
|
- "9": 0,
|
|
|
- "10": 0,
|
|
|
- "11": 1,
|
|
|
- "12": 2,
|
|
|
- "13": 3,
|
|
|
- "14": 3,
|
|
|
- "15": 4,
|
|
|
- "16": 5,
|
|
|
- "17": 6,
|
|
|
- "18": 7,
|
|
|
- "19": 8,
|
|
|
- "20": 9,
|
|
|
- "21": 9,
|
|
|
- "22": 9,
|
|
|
- "23": 9
|
|
|
- }
|
|
|
- });
|
|
|
- if (params.chy_token == 'm_token') {
|
|
|
- layer.token = this.m_token_map;
|
|
|
- }
|
|
|
-
|
|
|
- break;
|
|
|
- case "shc_map":
|
|
|
- layer = new SHCMapServiceLayerNew({
|
|
|
- url: url,
|
|
|
- id: id,
|
|
|
- title: title,
|
|
|
- opacity: opacity,
|
|
|
- visible: visible,
|
|
|
- fullExtent: this.m_fullExtent,
|
|
|
- spatialReference: this.m_spatialReference,
|
|
|
- });
|
|
|
- break;
|
|
|
case "feature":
|
|
|
layer = new FeatureLayer({
|
|
|
url: url,
|
|
@@ -1277,8 +1030,6 @@ export default {
|
|
|
title: title,
|
|
|
opacity: opacity,
|
|
|
visible: visible,
|
|
|
- spatialReference: this.m_spatialReference,
|
|
|
- fullExtent: this.m_fullExtent,
|
|
|
});
|
|
|
break;
|
|
|
case "building":
|
|
@@ -1319,116 +1070,6 @@ export default {
|
|
|
visible: visible
|
|
|
});
|
|
|
break;
|
|
|
- case "shc_tile":
|
|
|
- layer = new SHCTiledNewLayer({
|
|
|
- url: url,
|
|
|
- id: id,
|
|
|
- title: title,
|
|
|
- visible: visible,
|
|
|
- opacity: opacity,
|
|
|
- fullExtent: this.m_fullExtent,
|
|
|
- spatialReference: this.m_spatialReference,
|
|
|
- origin: {
|
|
|
- "x": -66000,
|
|
|
- "y": 75000
|
|
|
- },
|
|
|
- size: [512, 512],
|
|
|
- lods: [
|
|
|
- {
|
|
|
- "level": 0,
|
|
|
- "resolution": 132.2919312505292,
|
|
|
- "scale": 500000
|
|
|
- }, {
|
|
|
- "level": 1,
|
|
|
- "resolution": 52.91677250021167,
|
|
|
- "scale": 200000
|
|
|
- }, {
|
|
|
- "level": 2,
|
|
|
- "resolution": 26.458386250105836,
|
|
|
- "scale": 100000
|
|
|
- }, {
|
|
|
- "level": 3,
|
|
|
- "resolution": 13.229193125052918,
|
|
|
- "scale": 50000
|
|
|
- }, {
|
|
|
- "level": 4,
|
|
|
- "resolution": 5.291677250021167,
|
|
|
- "scale": 20000
|
|
|
- }, {
|
|
|
- "level": 5,
|
|
|
- "resolution": 2.6458386250105836,
|
|
|
- "scale": 10000
|
|
|
- }, {
|
|
|
- "level": 6,
|
|
|
- "resolution": 1.3229193125052918,
|
|
|
- "scale": 5000
|
|
|
- }, {
|
|
|
- "level": 7,
|
|
|
- "resolution": 0.5291677250021167,
|
|
|
- "scale": 2000
|
|
|
- }, {
|
|
|
- "level": 8,
|
|
|
- "resolution": 0.26458386250105836,
|
|
|
- "scale": 1000
|
|
|
- }, {
|
|
|
- "level": 9,
|
|
|
- "resolution": 0.13229193125052918,
|
|
|
- "scale": 500
|
|
|
- }],
|
|
|
- lodsLevelMapping: {
|
|
|
- "0": 0,
|
|
|
- "1": 0,
|
|
|
- "2": 0,
|
|
|
- "3": 0,
|
|
|
- "4": 0,
|
|
|
- "5": 0,
|
|
|
- "6": 0,
|
|
|
- "7": 0,
|
|
|
- "8": 0,
|
|
|
- "9": 0,
|
|
|
- "10": 0,
|
|
|
- "11": 1,
|
|
|
- "12": 2,
|
|
|
- "13": 3,
|
|
|
- "14": 3,
|
|
|
- "15": 4,
|
|
|
- "16": 5,
|
|
|
- "17": 6,
|
|
|
- "18": 7,
|
|
|
- "19": 8,
|
|
|
- "20": 9,
|
|
|
- "21": 9,
|
|
|
- "22": 9,
|
|
|
- "23": 9
|
|
|
- }
|
|
|
- });
|
|
|
-
|
|
|
- if (params.chy_token == 'm_token') {
|
|
|
- // layer.token = this.m_token_map;
|
|
|
- m_token_chy_map = this.getToken_map(dojoConfig["host1"], dojoConfig["username1"], dojoConfig["password1"]);
|
|
|
- //m_token_chy_map = "3AA47jcbE7y65-0VU9q9yANTA2PIuPFht-yfH6TjrVI.";
|
|
|
- console.log(m_token_chy_map);
|
|
|
- // let tokenInfo = {
|
|
|
- // server: 'http://map.smi.sh.cegn.cn/OneMapServer/rest/services/',
|
|
|
- // token: m_token_chy_map
|
|
|
- // }
|
|
|
- //IdentityManager.registerToken(tokenInfo)
|
|
|
- layer.token = m_token_chy_map;
|
|
|
- console.log("layer.token",layer.token)
|
|
|
- }
|
|
|
-
|
|
|
- break;
|
|
|
- case "shc_map":
|
|
|
- layer = new SHCMapServiceLayerNew({
|
|
|
- url: url,
|
|
|
- id: id,
|
|
|
- title: title,
|
|
|
- opacity: opacity,
|
|
|
- visible: visible,
|
|
|
- fullExtent: this.m_fullExtent,
|
|
|
- spatialReference: this.m_spatialReference,
|
|
|
- });
|
|
|
- break;
|
|
|
case "feature":
|
|
|
layer = new FeatureLayer({
|
|
|
url: url,
|
|
@@ -1580,6 +1221,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
fullExtent(){
|
|
|
+ debugger
|
|
|
this.m_view.extent = this.m_initialExtent;
|
|
|
// this.m_view.camera.tilt = 0;
|
|
|
// this.m_view.camera.heading = 0;
|
|
@@ -1934,6 +1576,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
if (layer.visible && layer.url !== null && list.indexOf(layer.id) < 0 && m_disableLayerIdList.indexOf(layer.id) < 0) {
|
|
|
+ debugger
|
|
|
let params = new IdentifyParameters();
|
|
|
params.tolerance = 5;
|
|
|
params.layerIds = layerIds;
|
|
@@ -1943,7 +1586,7 @@ export default {
|
|
|
params.geometry = evt.mapPoint; //evt.mapPoint m_hitPoint
|
|
|
params.mapExtent = n_view.extent; //m_view.extent
|
|
|
params.returnGeometry = true;
|
|
|
- params.spatialReference = "";
|
|
|
+ params.spatialReference = this.m_spatialReference;
|
|
|
identify.
|
|
|
identify(url,params)
|
|
|
.then((response) =>{
|
|
@@ -2974,7 +2617,8 @@ export default {
|
|
|
params.geometry = geometry; //evt.mapPoint m_hitPoint
|
|
|
params.mapExtent = this.m_view.extent; //m_view.extent
|
|
|
params.returnGeometry = true;
|
|
|
- params.spatialReference = "";
|
|
|
+ params.spatialReference = this.m_spatialReference;
|
|
|
+ debugger
|
|
|
identify.
|
|
|
identify(url,params)
|
|
|
.then((response) =>{
|
|
@@ -3662,7 +3306,7 @@ export default {
|
|
|
var queryUrl;
|
|
|
if (type === "qx") {
|
|
|
where = "1=1";
|
|
|
- queryUrl = await this.returnProxyUrl("https://cimweb.zjw.sh.cegn.cn:2008/MapProxyApi/getSceneServer/wptgl/03745144") + "/0/query?f=json";
|
|
|
+ queryUrl = await this.returnProxyUrl("https://cimnet.zjw.sh.gov.cn:2008/MapProxyApi/getSceneServer/wptgl/03745144") + "/0/query?f=json";
|
|
|
} else if (type === "jz") {
|
|
|
where = "所属区 = '" + district + "'";
|
|
|
queryUrl = await this.returnProxyUrl("https://10.90.11.49:2008/MapProxyApi/getSceneServer/dsjzx_sjgl/53261646") + "/0/query?f=json";
|
|
@@ -4099,7 +3743,7 @@ export default {
|
|
|
}
|
|
|
let readSceneNodeClass = new ReadIntegratedNodes({
|
|
|
view: this.m_view,
|
|
|
- layerUrl: await this.returnProxyUrl('https://cimweb.zjw.sh.cegn.cn:2008/MapProxyApi/getSceneServer/ptgl/05195418')+'/layers/0',
|
|
|
+ layerUrl: await this.returnProxyUrl('https://cimnet.zjw.sh.gov.cn:2008/MapProxyApi/getSceneServer/ptgl/05195418')+'/layers/0',
|
|
|
type: 'integrated',
|
|
|
geometryEngine: geometryEngine,
|
|
|
externalRenderers: externalRenderers,
|
|
@@ -4458,7 +4102,7 @@ export default {
|
|
|
view = new SceneView({
|
|
|
container: div,
|
|
|
logo:false,
|
|
|
- viewingMode:"global",
|
|
|
+ viewingMode:"local",
|
|
|
scale:dojoConfig["scale"],
|
|
|
spatialReference:this.m_spatialReference,
|
|
|
qualityProfile:"high",
|
|
@@ -6774,7 +6418,7 @@ export default {
|
|
|
container: "viewDiv",
|
|
|
map: this.m_map,
|
|
|
logo: false,
|
|
|
- viewingMode: "global",
|
|
|
+ viewingMode: "local",
|
|
|
scale: dojoConfig["scale"],
|
|
|
spatialReference: this.m_spatialReference,
|
|
|
qualityProfile: "high",
|