/*
|
* @Description:
|
* @Version: 1.0
|
* @Author: yangsx
|
* @Date: 2019-12-09 19:01:40
|
* @LastEditors: yangsx
|
* @LastEditTime: 2019-12-14 10:47:05
|
*/
|
/**
|
* 位置查询工具
|
* @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: 117.32627608398445,
|
ymin: 26.028863800659224,
|
xmax: 119.20493819335945,
|
ymax: 27.11788357604985,
|
spatialReference: { wkid: 4326 }
|
});
|
console.log(1234,extent);
|
|
this._map.setExtent(extent);
|
},
|
postCreate: function() {
|
this.inherited(arguments);
|
},
|
deactivate: function() {
|
this.inherited(arguments);
|
var extent = new Extent({
|
xmin: 117.32627608398445,
|
ymin: 26.028863800659224,
|
xmax: 119.20493819335945,
|
ymax: 27.11788357604985,
|
spatialReference: { wkid: 4326 }
|
});
|
console.log(1234,extent);
|
this._map.setExtent(extent);
|
}
|
});
|
return RL;
|
});
|