From 1e7d96a0b08d74328ed7ae56fbd6a2d365eaadb5 Mon Sep 17 00:00:00 2001
From: jxdnsong <592566207@qq.com>
Date: Wed, 03 Feb 2021 16:39:32 +0800
Subject: [PATCH] 地图定位

---
 public/map/widgets/map/MapWidget.js |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/public/map/widgets/map/MapWidget.js b/public/map/widgets/map/MapWidget.js
index 3b6a8d4..7de7685 100644
--- a/public/map/widgets/map/MapWidget.js
+++ b/public/map/widgets/map/MapWidget.js
@@ -124,10 +124,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;
@@ -245,7 +241,7 @@
                     }
                 }
             }))
-
+            AppEvent.dispatchAppEvent("mapLoad", this.map);
             return this.map
         },
         appendToolHandler: function (data) {
@@ -312,7 +308,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);
 
 
                 // //添加多时相图层

--
Gitblit v1.9.3