60e01dde by 刘远

jikai commit

1 parent a501ecb4
......@@ -209,6 +209,7 @@
is2D(flag) {
this.map = flag ? '' : 'threeMap';
this.isFullscreenLoading = true;
// this.leftPanel = flag ? 'taskList' : 'leftAssert';
loadModules([
"esri/Map",
"esri/Basemap",
......@@ -220,7 +221,7 @@
"esri/geometry/Extent",
"dojo/domReady!"
]).then(([Map, Basemap, MapView, TileLayer, WebTileLayer, MapImageLayer, SpatialReference, Extent]) => {
if(!this.mapView) {
if(!mapManage.mapView) {
mapManage.mapView = new MapView({
map: new Map({
basemap: new Basemap({
......@@ -237,37 +238,41 @@
})
}),
container: "arcgisMap",
center: [117.73289858455101, 36.255126757404966],
zoom: 9,
extent: new Extent({
xmin: 1.1332182150213555E7,
ymin: 4379415.470661429,
xmax: 1.1339935515720293E7,
ymax: 4383168.328167147,
spatialReference: 3857
})
// center: [117.73289858455101, 36.255126757404966],
// zoom: 9,
});
mapManage.mapView.when(() => {
this.isFullscreenLoading = false;
// this.leftPanel = flag ? 'taskList' : 'leftAssert';
this.leftPanel = 'taskList';
// objectManage.mapView.map.add(new MapImageLayer({
// url: "https://192.168.3.194:6443/arcgis/rest/services/xzsj/ygyx/MapServer"
// }));
mapManage.mapView.map.add(new MapImageLayer({
url: "https://192.168.3.194:6443/arcgis/rest/services/xzsj/ygyx/MapServer"
}));
this.mapInit();
}, function(error){
console.log("The view's resources failed to load: ", error);
});
return;
}
console.log('三维......');
this.isFullscreenLoading = false;
objectManage.mapView && (this.leftPanel = flag ? 'taskList' : 'leftAssert');
objectManage.mapView.destroy();
objectManage.mapView = undefined;
this.leftPanel = 'leftAssert';
// objectManage.mapView && (this.leftPanel = flag ? 'taskList' : 'leftAssert');
mapManage.mapView.destroy();
mapManage.mapView = undefined;
});
},
mapInit() {
GraphicAttributeManager.getInstance();
DrawTool.getInstance();
mapManage.drawTool.activate('point1', function() {
});
},
isCamera(flag) {
// this.commons.log(flag)
},
isLayer(flag) {
......