From d74b495736f0c04522ec54274b70fed0ded2878d Mon Sep 17 00:00:00 2001
From: zhongrj <646384940@qq.com>
Date: Tue, 27 Jun 2023 11:30:06 +0800
Subject: [PATCH] 任务新增导出
---
public/map/controls/toolbar/tools/LocationTool.js | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 60 insertions(+), 0 deletions(-)
diff --git a/public/map/controls/toolbar/tools/LocationTool.js b/public/map/controls/toolbar/tools/LocationTool.js
new file mode 100644
index 0000000..01c3ce5
--- /dev/null
+++ b/public/map/controls/toolbar/tools/LocationTool.js
@@ -0,0 +1,60 @@
+/*
+ * @Description:
+ * @Version: 1.0
+ * @Author: yangsx
+ * @Date: 2019-12-09 19:01:40
+ * @LastEditors: song
+ * @LastEditTime: 2021-02-03 17:11:24
+ */
+/**
+ * 位置查询工具
+ * @author Tengzh 2018-11-21
+ **/
+define([
+ "dojo/_base/declare",
+ "controls/toolbar/tools/BaseTool",
+ "dojo/dom-style",
+ "dojo/dom-construct",
+ "esri/geometry/Extent"
+], function(declare, BaseTool, domStyle, domConstruct, Extent) {
+ var RL = declare([BaseTool], {
+ _map: null,
+ constructor: function(args) {
+ this._normalIconClass = "tool-local-normal";
+ this._overIconClass = "tool-local-over";
+ this._selectedIconClass = "tool-local-select";
+ this._disableClass = "";
+ this.tooltip = "复位";
+ this._map = args.map;
+ },
+ activate: function(args) {
+ this.inherited(arguments);
+ var extent = new Extent({
+ "xmin": 12881727,
+ "ymin": 3326410,
+ "xmax": 12918360,
+ "ymax": 3344162,
+ "spatialReference": { "wkid": 102100 }
+ });
+ console.log(1234,extent);
+
+ this._map.setExtent(extent);
+ },
+ postCreate: function() {
+ this.inherited(arguments);
+ },
+ deactivate: function() {
+ this.inherited(arguments);
+ var extent = new Extent({
+ "xmin": 12881727,
+ "ymin": 3326410,
+ "xmax": 12918360,
+ "ymax": 3344162,
+ "spatialReference": { "wkid": 102100 }
+ });
+ console.log(1234,extent);
+ this._map.setExtent(extent);
+ }
+ });
+ return RL;
+});
--
Gitblit v1.9.3