jikai commit
Showing
1 changed file
with
19 additions
and
14 deletions
| ... | @@ -209,6 +209,7 @@ | ... | @@ -209,6 +209,7 @@ |
| 209 | is2D(flag) { | 209 | is2D(flag) { |
| 210 | this.map = flag ? '' : 'threeMap'; | 210 | this.map = flag ? '' : 'threeMap'; |
| 211 | this.isFullscreenLoading = true; | 211 | this.isFullscreenLoading = true; |
| 212 | // this.leftPanel = flag ? 'taskList' : 'leftAssert'; | ||
| 212 | loadModules([ | 213 | loadModules([ |
| 213 | "esri/Map", | 214 | "esri/Map", |
| 214 | "esri/Basemap", | 215 | "esri/Basemap", |
| ... | @@ -220,7 +221,7 @@ | ... | @@ -220,7 +221,7 @@ |
| 220 | "esri/geometry/Extent", | 221 | "esri/geometry/Extent", |
| 221 | "dojo/domReady!" | 222 | "dojo/domReady!" |
| 222 | ]).then(([Map, Basemap, MapView, TileLayer, WebTileLayer, MapImageLayer, SpatialReference, Extent]) => { | 223 | ]).then(([Map, Basemap, MapView, TileLayer, WebTileLayer, MapImageLayer, SpatialReference, Extent]) => { |
| 223 | if(!this.mapView) { | 224 | if(!mapManage.mapView) { |
| 224 | mapManage.mapView = new MapView({ | 225 | mapManage.mapView = new MapView({ |
| 225 | map: new Map({ | 226 | map: new Map({ |
| 226 | basemap: new Basemap({ | 227 | basemap: new Basemap({ |
| ... | @@ -237,37 +238,41 @@ | ... | @@ -237,37 +238,41 @@ |
| 237 | }) | 238 | }) |
| 238 | }), | 239 | }), |
| 239 | container: "arcgisMap", | 240 | container: "arcgisMap", |
| 240 | center: [117.73289858455101, 36.255126757404966], | 241 | extent: new Extent({ |
| 241 | zoom: 9, | 242 | xmin: 1.1332182150213555E7, |
| 243 | ymin: 4379415.470661429, | ||
| 244 | xmax: 1.1339935515720293E7, | ||
| 245 | ymax: 4383168.328167147, | ||
| 246 | spatialReference: 3857 | ||
| 247 | }) | ||
| 248 | // center: [117.73289858455101, 36.255126757404966], | ||
| 249 | // zoom: 9, | ||
| 242 | }); | 250 | }); |
| 243 | mapManage.mapView.when(() => { | 251 | mapManage.mapView.when(() => { |
| 244 | this.isFullscreenLoading = false; | 252 | this.isFullscreenLoading = false; |
| 245 | // this.leftPanel = flag ? 'taskList' : 'leftAssert'; | ||
| 246 | this.leftPanel = 'taskList'; | 253 | this.leftPanel = 'taskList'; |
| 247 | // objectManage.mapView.map.add(new MapImageLayer({ | 254 | mapManage.mapView.map.add(new MapImageLayer({ |
| 248 | // url: "https://192.168.3.194:6443/arcgis/rest/services/xzsj/ygyx/MapServer" | 255 | url: "https://192.168.3.194:6443/arcgis/rest/services/xzsj/ygyx/MapServer" |
| 249 | // })); | 256 | })); |
| 250 | this.mapInit(); | 257 | this.mapInit(); |
| 251 | }, function(error){ | 258 | }, function(error){ |
| 252 | console.log("The view's resources failed to load: ", error); | 259 | console.log("The view's resources failed to load: ", error); |
| 253 | }); | 260 | }); |
| 254 | return; | 261 | return; |
| 255 | } | 262 | } |
| 263 | console.log('三维......'); | ||
| 256 | this.isFullscreenLoading = false; | 264 | this.isFullscreenLoading = false; |
| 257 | objectManage.mapView && (this.leftPanel = flag ? 'taskList' : 'leftAssert'); | 265 | this.leftPanel = 'leftAssert'; |
| 258 | objectManage.mapView.destroy(); | 266 | // objectManage.mapView && (this.leftPanel = flag ? 'taskList' : 'leftAssert'); |
| 259 | objectManage.mapView = undefined; | 267 | mapManage.mapView.destroy(); |
| 268 | mapManage.mapView = undefined; | ||
| 260 | }); | 269 | }); |
| 261 | }, | 270 | }, |
| 262 | mapInit() { | 271 | mapInit() { |
| 263 | GraphicAttributeManager.getInstance(); | 272 | GraphicAttributeManager.getInstance(); |
| 264 | DrawTool.getInstance(); | 273 | DrawTool.getInstance(); |
| 265 | mapManage.drawTool.activate('point1', function() { | ||
| 266 | |||
| 267 | }); | ||
| 268 | }, | 274 | }, |
| 269 | isCamera(flag) { | 275 | isCamera(flag) { |
| 270 | // this.commons.log(flag) | ||
| 271 | 276 | ||
| 272 | }, | 277 | }, |
| 273 | isLayer(flag) { | 278 | isLayer(flag) { | ... | ... |
-
Please register or sign in to post a comment