From a7a86324ae4e519b8ee0a3fa3038f3afa2e14dec Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Thu, 04 Feb 2021 13:49:35 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.105:10010/r/jfpt-Vue
---
public/map/widgets/map/MapWidget.js | 37 ++++++++++++++-----------------------
1 files changed, 14 insertions(+), 23 deletions(-)
diff --git a/public/map/widgets/map/MapWidget.js b/public/map/widgets/map/MapWidget.js
index 3b6a8d4..a7e1d18 100644
--- a/public/map/widgets/map/MapWidget.js
+++ b/public/map/widgets/map/MapWidget.js
@@ -1,8 +1,3 @@
-/**
- * 富地图widget
- * @author Liuyl
- * @date 2015/10/20
- */
define([
"dojo/_base/declare",
"dojo/_base/lang",
@@ -100,7 +95,7 @@
this.map = new Map(this.mapBoxDom.id, {
logo: this._parseResult.maplogo,
showAttribution: true,
- extent: this._parseResult.extent,
+ extent: extent,
maxZoom: 17,
minZoom: 0,
navigationMode: "classic"
@@ -124,10 +119,6 @@
this._eventHandlers.push(this.map.on("mouse-move", lang.hitch(this, this._onMouseMove)));
AppEvent.addAppEventListener(AppEvent.SWITCH_BASEMAP, lang.hitch(this, this.onSwitchBaseMap));
AppEvent.addAppEventListener(AppEvent.ADD_TOP_MOST_LAYER, lang.hitch(this, this.onAddTopMostLayer));
- AppEvent.addAppEventListener("goto", lang.hitch(this, this.goto));
- },
- goto: function (evt) {
- this.map.centerAndZoom(new Point(evt.x,evt.y, new SpatialReference({ wkid: 4326 })), 14);
},
onload: function () {
//var listNode = this.map.attribution.listNode;
@@ -157,11 +148,11 @@
}, listNode);
on(locationb, 'click', lang.hitch(this, function () {
var extent = new Extent({
- "xmin": 117.32627608398445,
- "ymin": 26.028863800659224,
- "xmax": 119.20493819335945,
- "ymax": 27.11788357604985,
- "spatialReference": { "wkid": 4326 }
+ "xmin": 12881727,
+ "ymin": 3326410,
+ "xmax": 12918360,
+ "ymax": 3344162,
+ "spatialReference": { "wkid": 102100 }
});
this.map.setExtent(extent);
}));
@@ -245,7 +236,7 @@
}
}
}))
-
+ AppEvent.dispatchAppEvent("mapLoad", this.map);
return this.map
},
appendToolHandler: function (data) {
@@ -312,7 +303,7 @@
});
this.map.addLayer(cycleMap);
- this.map.centerAndZoom(new Point(115.806669,28.68635, new SpatialReference({ wkid: 4326 })), 14);
+ //this.map.centerAndZoom(new Point(115.806669,28.68635, new SpatialReference({ wkid: 4326 })), 14);
// //添加多时相图层
@@ -380,13 +371,13 @@
},
_getStartExtent: function () {
- return new esri.geometry.Extent({
- "xmin": ConfigData.basemap.initExtent[0],
- "ymin": ConfigData.basemap.initExtent[1],
- "xmax": ConfigData.basemap.initExtent[2],
- "ymax": ConfigData.basemap.initExtent[3],
+ return new Extent({
+ "xmin": Number(ConfigData.basemap.initExtent[0]),
+ "ymin": Number(ConfigData.basemap.initExtent[1]),
+ "xmax": Number(ConfigData.basemap.initExtent[2]),
+ "ymax": Number(ConfigData.basemap.initExtent[3]),
"spatialReference": {
- "wkid": ConfigData.basemap.wkid
+ "wkid": Number(ConfigData.basemap.wkid)
}
});
},
--
Gitblit v1.9.3