@vtx/map 1.1.47 → 1.1.48

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/lib/VtxMap/AMap/AMap.js +630 -1000
  2. package/lib/VtxMap/AMap/AMap.js.map +1 -1
  3. package/lib/VtxMap/BMap/Map.js +747 -1195
  4. package/lib/VtxMap/BMap/Map.js.map +1 -1
  5. package/lib/VtxMap/GMap/Map.js +1046 -1564
  6. package/lib/VtxMap/GMap/Map.js.map +1 -1
  7. package/lib/VtxMap/Map.js +8 -42
  8. package/lib/VtxMap/Map.js.map +1 -1
  9. package/lib/VtxMap/MapToolFunction.js +26 -63
  10. package/lib/VtxMap/MapToolFunction.js.map +1 -1
  11. package/lib/VtxMap/OMap/Map.js +867 -1361
  12. package/lib/VtxMap/OMap/Map.js.map +1 -1
  13. package/lib/VtxMap/OlMap/Map.js +717 -1225
  14. package/lib/VtxMap/OlMap/Map.js.map +1 -1
  15. package/lib/VtxMap/TMap/TMap.js +651 -1058
  16. package/lib/VtxMap/TMap/TMap.js.map +1 -1
  17. package/lib/VtxMap/index.js +1 -8
  18. package/lib/VtxMap/index.js.map +1 -1
  19. package/lib/VtxMap/mapPlayer.js +67 -123
  20. package/lib/VtxMap/mapPlayer.js.map +1 -1
  21. package/lib/VtxMap/optimizingPointMap.js +21 -77
  22. package/lib/VtxMap/optimizingPointMap.js.map +1 -1
  23. package/lib/VtxMap/style/css.js +0 -6
  24. package/lib/VtxMap/style/css.js.map +1 -1
  25. package/lib/VtxMap/style/index.js +0 -6
  26. package/lib/VtxMap/style/index.js.map +1 -1
  27. package/lib/VtxMap/zoomMap.js +12 -41
  28. package/lib/VtxMap/zoomMap.js.map +1 -1
  29. package/lib/VtxModal/VtxModal.js +19 -63
  30. package/lib/VtxModal/VtxModal.js.map +1 -1
  31. package/lib/VtxModal/draggableModal.js +12 -48
  32. package/lib/VtxModal/draggableModal.js.map +1 -1
  33. package/lib/VtxModal/index.js +1 -6
  34. package/lib/VtxModal/index.js.map +1 -1
  35. package/lib/VtxModal/style/css.js +0 -6
  36. package/lib/VtxModal/style/css.js.map +1 -1
  37. package/lib/VtxModal/style/index.js +0 -6
  38. package/lib/VtxModal/style/index.js.map +1 -1
  39. package/lib/VtxSearchCheckMap/VtxSearchCheckMap.js +105 -238
  40. package/lib/VtxSearchCheckMap/VtxSearchCheckMap.js.map +1 -1
  41. package/lib/VtxSearchCheckMap/index.js +0 -2
  42. package/lib/VtxSearchCheckMap/index.js.map +1 -1
  43. package/lib/VtxSearchCheckMap/mapping.js +1 -2
  44. package/lib/VtxSearchCheckMap/mapping.js.map +1 -1
  45. package/lib/VtxSearchCheckMap/style/css.js +0 -19
  46. package/lib/VtxSearchCheckMap/style/css.js.map +1 -1
  47. package/lib/VtxSearchCheckMap/style/index.js +0 -19
  48. package/lib/VtxSearchCheckMap/style/index.js.map +1 -1
  49. package/lib/VtxSearchMap/VtxSearchMap.js +94 -229
  50. package/lib/VtxSearchMap/VtxSearchMap.js.map +1 -1
  51. package/lib/VtxSearchMap/index.js +0 -2
  52. package/lib/VtxSearchMap/index.js.map +1 -1
  53. package/lib/VtxSearchMap/mapping.js +1 -2
  54. package/lib/VtxSearchMap/mapping.js.map +1 -1
  55. package/lib/VtxSearchMap/style/css.js +0 -19
  56. package/lib/VtxSearchMap/style/css.js.map +1 -1
  57. package/lib/VtxSearchMap/style/index.js +0 -19
  58. package/lib/VtxSearchMap/style/index.js.map +1 -1
  59. package/lib/default.js +4 -13
  60. package/lib/default.js.map +1 -1
  61. package/lib/index.js +0 -3
  62. package/lib/index.js.map +1 -1
  63. package/lib/utils/util.js +5 -17
  64. package/lib/utils/util.js.map +1 -1
  65. package/package.json +1 -1
@@ -1,84 +1,48 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
-
3
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports["default"] = void 0;
9
-
10
8
  var _react = _interopRequireDefault(require("react"));
11
-
12
9
  var _button = _interopRequireDefault(require("antd/lib/button"));
13
-
14
10
  var _input = _interopRequireDefault(require("antd/lib/input"));
15
-
16
11
  var _message = _interopRequireDefault(require("antd/lib/message"));
17
-
18
12
  var _checkbox = _interopRequireDefault(require("antd/lib/checkbox"));
19
-
20
13
  var _popover = _interopRequireDefault(require("antd/lib/popover"));
21
-
22
14
  var _VtxModal = require("../VtxModal");
23
-
24
15
  var _VtxMap = require("../VtxMap");
25
-
26
16
  var _default2 = _interopRequireWildcard(require("../default"));
27
-
28
17
  var _mapping = require("./mapping");
29
-
30
18
  var _util = require("../utils/util");
31
-
32
19
  var _antd = require("antd");
33
-
34
20
  var _DownOutlined = _interopRequireDefault(require("@ant-design/icons/DownOutlined"));
35
-
36
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
37
-
38
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
39
-
21
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
22
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
40
23
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
41
-
42
24
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
43
-
44
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
45
-
46
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
47
-
25
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
26
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
48
27
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
49
-
50
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
51
-
28
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
52
29
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
53
-
54
30
  function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
55
-
56
31
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
57
-
58
32
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
59
-
60
33
  function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
61
-
62
34
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
63
-
64
35
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
65
-
66
36
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
67
-
68
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
69
-
37
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
38
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
39
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
70
40
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
71
-
72
41
  function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
73
-
74
42
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
75
-
76
43
  function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
77
-
78
44
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
79
-
80
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
81
-
45
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } //公共地址配置
82
46
  var styles = {
83
47
  searchModal: 'vtx-ui-searchmap-searchmodal',
84
48
  searchMap: 'vtx-ui-searchmap-searchmap',
@@ -110,18 +74,17 @@ var CoverageTypes = [{
110
74
  }, {
111
75
  name: '卫星底图',
112
76
  key: 'wx'
113
- }]; // message.config({
77
+ }];
78
+
79
+ // message.config({
114
80
  // top: document.getElementById('root').offsetHeight/3,
115
81
  // duration: 5,
116
82
  // });
117
-
118
83
  var warning = function warning() {
119
84
  _message["default"].warning('位置点查询失败,请缩小比例尺或切换关键字后再重新查询!');
120
85
  };
121
-
122
86
  function distinct(ary) {
123
87
  var pts = _toConsumableArray(ary);
124
-
125
88
  if (pts[0][0] == pts[pts.length - 1][0] && pts[0][1] == pts[pts.length - 1][1]) {
126
89
  pts.pop();
127
90
  return distinct(pts);
@@ -129,67 +92,57 @@ function distinct(ary) {
129
92
  return pts;
130
93
  }
131
94
  }
132
-
133
95
  var getIcon = function getIcon(type) {
134
96
  return _default2.antdMajorVersion === '4' ? /*#__PURE__*/_react["default"].createElement(_default2.VtxMapIcon, {
135
97
  type: "icon-".concat(_mapping.iconMapping[type])
136
98
  }) : type;
137
99
  };
138
-
139
100
  var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
140
101
  _inherits(VtxSearchMap, _React$Component);
141
-
142
102
  var _super = _createSuper(VtxSearchMap);
143
-
144
103
  function VtxSearchMap(props) {
145
104
  var _this;
146
-
147
105
  _classCallCheck(this, VtxSearchMap);
148
-
149
106
  _this = _super.call(this, props);
150
-
107
+ // 绘制多个图元时返回参数
151
108
  _defineProperty(_assertThisInitialized(_this), "getMultiRes", function (graphicType) {
152
109
  var resData = [];
153
110
  var _this$state = _this.state,
154
- graphicValue = _this$state.graphicValue,
155
- editGraphic = _this$state.editGraphic;
156
-
111
+ graphicValue = _this$state.graphicValue,
112
+ editGraphic = _this$state.editGraphic;
157
113
  switch (graphicType) {
158
114
  case 'polygon':
159
115
  [].concat(_toConsumableArray(graphicValue || []), _toConsumableArray(editGraphic || [])).forEach(function (item) {
160
116
  resData.push({
117
+ id: item.id,
161
118
  rings: distinct(item.rings || item.geometry.rings),
162
119
  area: _this.map.getPolygonArea(distinct(item.rings || item.geometry.rings))
163
120
  });
164
121
  });
165
122
  break;
166
-
167
123
  case 'polyline':
168
124
  [].concat(_toConsumableArray(graphicValue || []), _toConsumableArray(editGraphic || [])).forEach(function (item) {
169
125
  resData.push({
126
+ id: item.id,
170
127
  paths: item.paths || item.geometry.paths,
171
128
  length: _this.map.calculateDistance(item.paths || item.geometry.paths)
172
129
  });
173
130
  });
174
-
175
131
  default:
176
132
  break;
177
133
  }
178
-
179
134
  return resData.length ? resData : null;
180
135
  });
181
-
182
136
  _this.map = null; //Map组件的ref对象
183
-
184
137
  _this.mapLoaded = false;
185
138
  _this.isDrawStatus = false;
186
139
  _this.isClickMap = false;
187
140
  _this.apid = []; //所有点id,除编辑点外
188
-
189
141
  _this.loadExtent = null;
190
142
  _this.mapId = "searchMap".concat(new Date().getTime());
191
143
  _this.multiDraw = props.multiDraw && ['polygon', 'polyline'].includes(props.graphicType);
192
- _this.clickable = false, // 多个面绘制时,是否可以点击面进行编辑
144
+ _this.clickable = false,
145
+ // 多个面绘制时,是否可以点击面进行编辑
193
146
  _this.state = {
194
147
  //列表和地图宽度切换的动画需要
195
148
  isShowList: false,
@@ -208,7 +161,6 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
208
161
  graphicValue: _this.multiDraw ? [] : null,
209
162
  // 绘制图元id集合
210
163
  drawGraphID: _this.multiDraw ? ['drawnGraph'] : 'drawnGraph',
211
-
212
164
  /*地图Api参数*/
213
165
  mapCenter: props.mapCenter || '',
214
166
  maxZoom: props.maxZoom,
@@ -229,7 +181,6 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
229
181
  editGraphic: _this.multiDraw ? [] : null,
230
182
  mapZoomLevel: props.mapZoomLevel || 11,
231
183
  setZoomLevel: false,
232
-
233
184
  /*modal参数*/
234
185
  modal1Visible: props.modal1Visible || false,
235
186
  isShowOther: props.isShowOther || false,
@@ -246,35 +197,28 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
246
197
  customNodes: props.customNodes || null
247
198
  };
248
199
  return _this;
249
- } // 绘制多个图元时返回参数
250
-
251
-
200
+ }
252
201
  _createClass(VtxSearchMap, [{
253
202
  key: "callback",
254
- value: //经纬度回调
203
+ value:
204
+ //经纬度回调
255
205
  function callback() {
256
206
  var fun = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'callback';
257
-
258
207
  if (fun in this.props && typeof this.props[fun] === 'function') {
259
208
  var editGraphicId = this.state.editGraphicId;
260
-
261
209
  switch (this.state.graphicType) {
262
210
  case 'point':
263
211
  var locationPoint = this.state.locationPoint;
264
-
265
212
  if (this.map.getGraphic('locationPoint')) {
266
213
  var p = this.map.getGraphic(locationPoint[0].id).geometry;
267
214
  this.props[fun]([p.x, p.y]);
268
215
  } else {
269
216
  return [];
270
217
  }
271
-
272
218
  break;
273
-
274
219
  case 'circle':
275
220
  if (this.map.getGraphic(editGraphicId)) {
276
221
  var _p = this.map.getGraphic(editGraphicId);
277
-
278
222
  this.props[fun]({
279
223
  x: _p.geometry.x,
280
224
  y: _p.geometry.y,
@@ -289,18 +233,14 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
289
233
  area: this.state.graphicValue.area
290
234
  } : null);
291
235
  }
292
-
293
236
  break;
294
-
295
237
  case 'polygon':
296
238
  if (this.multiDraw) {
297
239
  this.props[fun](this.getMultiRes('polygon'));
298
240
  return;
299
241
  }
300
-
301
242
  if (this.map.getGraphic(editGraphicId)) {
302
243
  var _p2 = this.map.getGraphic(editGraphicId);
303
-
304
244
  this.props[fun]({
305
245
  rings: distinct(_p2.geometry.rings),
306
246
  area: this.map.getPolygonArea(distinct(_p2.geometry.rings))
@@ -311,25 +251,20 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
311
251
  area: this.state.graphicValue.area
312
252
  } : null);
313
253
  }
314
-
315
254
  break;
316
-
317
255
  case 'rectangle':
318
256
  this.props[fun](this.state.graphicValue ? {
319
257
  rings: distinct(this.state.graphicValue.geometry.rings),
320
258
  area: this.state.graphicValue.area
321
259
  } : null);
322
260
  break;
323
-
324
261
  case 'polyline':
325
262
  if (this.multiDraw) {
326
263
  this.props[fun](this.getMultiRes('polyline'));
327
264
  return;
328
265
  }
329
-
330
266
  if (this.map.getGraphic(editGraphicId)) {
331
267
  var _p3 = this.map.getGraphic(editGraphicId);
332
-
333
268
  this.props[fun]({
334
269
  paths: _p3.geometry.paths,
335
270
  length: this.map.calculateDistance(_p3.geometry.paths)
@@ -340,11 +275,9 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
340
275
  length: this.map.calculateDistance(this.state.graphicValue.geometry.paths)
341
276
  } : null);
342
277
  }
343
-
344
278
  break;
345
279
  }
346
280
  }
347
-
348
281
  if (this.props.clearDrawnGraph) {
349
282
  this.clearDrawnGraph();
350
283
  }
@@ -355,18 +288,17 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
355
288
  this.setState({
356
289
  isShowList: bealoon
357
290
  });
358
- } //绘制定位点(以当前的中心点位参照 => 同时开启点位编辑)
359
-
291
+ }
292
+ //绘制定位点(以当前的中心点位参照 => 同时开启点位编辑)
360
293
  }, {
361
294
  key: "drawLocationPoint",
362
295
  value: function drawLocationPoint() {
363
- var t = this; //判断arcgis,是: 判断中心点是否已经确定,确定,继续走逻辑.不确认.轮询等待
364
-
296
+ var t = this;
297
+ //判断arcgis,是: 判断中心点是否已经确定,确定,继续走逻辑.不确认.轮询等待
365
298
  if (this.props.mapType !== 'gmap' || this.map.state.gis.extent && !!this.map.state.gis.extent.xmax) {
366
299
  var lglt = this.map.getMapExtent(),
367
- editGraphic = null,
368
- editGraphicId = 'locationPoint';
369
-
300
+ editGraphic = null,
301
+ editGraphicId = 'locationPoint';
370
302
  if (!this.multiDraw && this.props.editParam) {
371
303
  // && (this.props.graphicType == 'polyline' || this.props.graphicType == 'polygon')
372
304
  editGraphic = _objectSpread(_objectSpread({}, this.props.editParam), {}, {
@@ -374,17 +306,15 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
374
306
  });
375
307
  editGraphicId = 'drawnGraph';
376
308
  }
377
-
378
309
  if (this.multiDraw && Array.isArray(this.props.editParam) && this.props.editParam.length) {
379
310
  // && (this.props.graphicType == 'polyline' || this.props.graphicType == 'polygon')
380
311
  editGraphic = this.props.editParam.map(function (item, index) {
381
312
  return _objectSpread(_objectSpread({}, item), {}, {
382
- id: "drawnGraph".concat(index)
313
+ id: item.id || "drawnGraph".concat(index)
383
314
  });
384
315
  });
385
316
  editGraphicId = null;
386
317
  }
387
-
388
318
  this.isinit = false;
389
319
  this.setState({
390
320
  editGraphic: editGraphic,
@@ -415,13 +345,13 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
415
345
  t.drawLocationPoint();
416
346
  }, 50);
417
347
  }
418
- } //校正定位的点位位置到当前的中心点
419
-
348
+ }
349
+ //校正定位的点位位置到当前的中心点
420
350
  }, {
421
351
  key: "correction",
422
352
  value: function correction() {
423
- var t = this; //获取当前中心点经纬度
424
-
353
+ var t = this;
354
+ //获取当前中心点经纬度
425
355
  var lglt = this.map.getMapExtent();
426
356
  var locationPoint = t.state.locationPoint;
427
357
  locationPoint = locationPoint.map(function (item, index) {
@@ -431,27 +361,24 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
431
361
  });
432
362
  });
433
363
  this.map.updatePoint(locationPoint);
434
- } //搜索关键字切换
435
-
364
+ }
365
+ //搜索关键字切换
436
366
  }, {
437
367
  key: "changeValue",
438
368
  value: function changeValue(e) {
439
369
  this.setState({
440
370
  searchValue: e.target.value
441
371
  });
442
- } //根据关键字搜索数据
443
-
372
+ }
373
+ //根据关键字搜索数据
444
374
  }, {
445
375
  key: "searchList",
446
376
  value: function searchList() {
447
377
  var t = this;
448
-
449
378
  if (!t.state.searchValue) {
450
379
  _message["default"].warn("请输入搜索关键字");
451
-
452
380
  return;
453
381
  }
454
-
455
382
  if (window.AMap) {
456
383
  t.searchPoints();
457
384
  } else {
@@ -490,12 +417,10 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
490
417
  key: "handleSearch",
491
418
  value: function handleSearch(results) {
492
419
  var t = this;
493
-
494
420
  if (results.length > 0) {
495
421
  var lsp = [],
496
- lsm = [];
422
+ lsm = [];
497
423
  t.apid = [];
498
-
499
424
  for (var i = 0; i < results.length; i++) {
500
425
  var r = results[i];
501
426
  lsp.push(_objectSpread(_objectSpread({}, results[i]), {}, {
@@ -510,7 +435,6 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
510
435
  });
511
436
  t.apid.push(r.id);
512
437
  }
513
-
514
438
  t.setState({
515
439
  listPoint: lsp,
516
440
  listMess: lsm,
@@ -520,13 +444,13 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
520
444
  } else {
521
445
  warning();
522
446
  }
523
- } //返回最佳位置(zoom,center)
447
+ }
524
448
 
449
+ //返回最佳位置(zoom,center)
525
450
  }, {
526
451
  key: "setFitView",
527
452
  value: function setFitView() {
528
453
  var _this2 = this;
529
-
530
454
  this.setState({
531
455
  mapVisiblePoints: {
532
456
  fitView: this.apid,
@@ -538,8 +462,8 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
538
462
  setVisiblePoints: false
539
463
  });
540
464
  });
541
- } //清空列表的所有数据(包括点位)
542
-
465
+ }
466
+ //清空列表的所有数据(包括点位)
543
467
  }, {
544
468
  key: "clearList",
545
469
  value: function clearList() {
@@ -550,15 +474,15 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
550
474
  listMess: [],
551
475
  isShowList: false
552
476
  });
553
- } //列表选中地址
554
-
477
+ }
478
+ //列表选中地址
555
479
  }, {
556
480
  key: "chooseAddress",
557
481
  value: function chooseAddress(id) {
558
482
  var t = this;
559
483
  var _this$state2 = this.state,
560
- listPoint = _this$state2.listPoint,
561
- listMess = _this$state2.listMess;
484
+ listPoint = _this$state2.listPoint,
485
+ listMess = _this$state2.listMess;
562
486
  var mapCenter = [];
563
487
  listPoint = listPoint.map(function (item, index) {
564
488
  if (item.id === id) {
@@ -594,7 +518,6 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
594
518
  t.setState({
595
519
  setCenter: false
596
520
  });
597
-
598
521
  if (t.state.graphicType == 'point') {
599
522
  t.correction();
600
523
  }
@@ -604,14 +527,11 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
604
527
  key: "clickGraphic",
605
528
  value: function clickGraphic(obj) {
606
529
  var _this3 = this;
607
-
608
530
  if (obj.type === 'point' && obj.attributes.other === 'search') {
609
531
  this.chooseAddress(obj.attributes.id);
610
532
  }
611
-
612
533
  if (this.clickable && ['polygon', 'polyline'].includes(obj.type)) {
613
534
  var _obj$param$attributes;
614
-
615
535
  // 开启编辑
616
536
  this.setState({
617
537
  editGraphicId: obj.param.id || ((_obj$param$attributes = obj.param.attributes) === null || _obj$param$attributes === void 0 ? void 0 : _obj$param$attributes.id),
@@ -628,7 +548,6 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
628
548
  value: function closeModal(e) {
629
549
  this.isDrawStatus = false;
630
550
  this.isClickMap = false;
631
-
632
551
  if (this.isDrawStatus && this.isClickMap) {
633
552
  _message["default"].warning('请双击结束图元编辑');
634
553
  } else {
@@ -638,17 +557,16 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
638
557
  this.setState({
639
558
  modal1Visible: false
640
559
  });
641
- } // if(this.props.clearDrawnGraph){
642
-
643
-
644
- this.clearDrawnGraph(); // }
560
+ }
561
+ // if(this.props.clearDrawnGraph){
562
+ this.clearDrawnGraph();
563
+ // }
645
564
  }
646
565
  }
647
566
  }, {
648
567
  key: "clearDrawnGraph",
649
568
  value: function clearDrawnGraph() {
650
569
  var _this4 = this;
651
-
652
570
  this.isDrawStatus = true;
653
571
  this.setState({
654
572
  isDraw: this.state.graphicType !== 'point',
@@ -664,7 +582,6 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
664
582
  key: "continueDraw",
665
583
  value: function continueDraw(func) {
666
584
  var _this5 = this;
667
-
668
585
  this.clickable = false;
669
586
  this.setState({
670
587
  isDraw: false,
@@ -687,15 +604,11 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
687
604
  key: "editGraphic",
688
605
  value: function editGraphic() {
689
606
  var _this6 = this;
690
-
691
607
  if (this.isDrawStatus && this.isClickMap) {
692
608
  _message["default"].warning('请双击结束图元编辑');
693
-
694
609
  return;
695
610
  }
696
-
697
611
  _message["default"].info('请点击图元进行编辑');
698
-
699
612
  this.clickable = true;
700
613
  this.isDrawStatus = false;
701
614
  this.setState({
@@ -715,8 +628,8 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
715
628
  value: function editGraphicChange(obj) {
716
629
  if (!this.multiDraw) return;
717
630
  var _this$state3 = this.state,
718
- graphicValue = _this$state3.graphicValue,
719
- editGraphic = _this$state3.editGraphic;
631
+ graphicValue = _this$state3.graphicValue,
632
+ editGraphic = _this$state3.editGraphic;
720
633
  this.setState({
721
634
  graphicValue: (graphicValue || []).map(function (item) {
722
635
  return item.id === obj.id ? obj : item;
@@ -735,7 +648,6 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
735
648
  currentMap: str
736
649
  });
737
650
  var layers = [];
738
-
739
651
  switch (mapType) {
740
652
  case 'amap':
741
653
  case 'bmap':
@@ -745,12 +657,9 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
745
657
  } else {
746
658
  t.map.setMapType('wx');
747
659
  }
748
-
749
660
  break;
750
-
751
661
  case 'gmap':
752
662
  break;
753
-
754
663
  default:
755
664
  break;
756
665
  }
@@ -759,43 +668,42 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
759
668
  key: "render",
760
669
  value: function render() {
761
670
  var _this7 = this;
762
-
763
671
  var t = this;
764
672
  var _this$state4 = this.state,
765
- isShowList = _this$state4.isShowList,
766
- searchValue = _this$state4.searchValue,
767
- locationPoint = _this$state4.locationPoint,
768
- listPoint = _this$state4.listPoint,
769
- listMess = _this$state4.listMess,
770
- mapZoomLevel = _this$state4.mapZoomLevel,
771
- setZoomLevel = _this$state4.setZoomLevel,
772
- maxZoom = _this$state4.maxZoom,
773
- minZoom = _this$state4.minZoom,
774
- wkid = _this$state4.wkid,
775
- mapServer = _this$state4.mapServer,
776
- mapCenter = _this$state4.mapCenter,
777
- setCenter = _this$state4.setCenter,
778
- mapType = _this$state4.mapType,
779
- mapStyle = _this$state4.mapStyle,
780
- mapVisiblePoints = _this$state4.mapVisiblePoints,
781
- setVisiblePoints = _this$state4.setVisiblePoints,
782
- isDoEdit = _this$state4.isDoEdit,
783
- editGraphicId = _this$state4.editGraphicId,
784
- isEndEdit = _this$state4.isEndEdit,
785
- modal1Visible = _this$state4.modal1Visible,
786
- drawGraphID = _this$state4.drawGraphID,
787
- isShowOther = _this$state4.isShowOther,
788
- otherText = _this$state4.otherText,
789
- isShowOtherGraph = _this$state4.isShowOtherGraph,
790
- editGraphic = _this$state4.editGraphic,
791
- graphicType = _this$state4.graphicType,
792
- graphicValue = _this$state4.graphicValue,
793
- olProps = _this$state4.olProps,
794
- isChangeMapType = _this$state4.isChangeMapType,
795
- currentMap = _this$state4.currentMap,
796
- showControl = _this$state4.showControl,
797
- coverageType = _this$state4.coverageType,
798
- customNodes = _this$state4.customNodes;
673
+ isShowList = _this$state4.isShowList,
674
+ searchValue = _this$state4.searchValue,
675
+ locationPoint = _this$state4.locationPoint,
676
+ listPoint = _this$state4.listPoint,
677
+ listMess = _this$state4.listMess,
678
+ mapZoomLevel = _this$state4.mapZoomLevel,
679
+ setZoomLevel = _this$state4.setZoomLevel,
680
+ maxZoom = _this$state4.maxZoom,
681
+ minZoom = _this$state4.minZoom,
682
+ wkid = _this$state4.wkid,
683
+ mapServer = _this$state4.mapServer,
684
+ mapCenter = _this$state4.mapCenter,
685
+ setCenter = _this$state4.setCenter,
686
+ mapType = _this$state4.mapType,
687
+ mapStyle = _this$state4.mapStyle,
688
+ mapVisiblePoints = _this$state4.mapVisiblePoints,
689
+ setVisiblePoints = _this$state4.setVisiblePoints,
690
+ isDoEdit = _this$state4.isDoEdit,
691
+ editGraphicId = _this$state4.editGraphicId,
692
+ isEndEdit = _this$state4.isEndEdit,
693
+ modal1Visible = _this$state4.modal1Visible,
694
+ drawGraphID = _this$state4.drawGraphID,
695
+ isShowOther = _this$state4.isShowOther,
696
+ otherText = _this$state4.otherText,
697
+ isShowOtherGraph = _this$state4.isShowOtherGraph,
698
+ editGraphic = _this$state4.editGraphic,
699
+ graphicType = _this$state4.graphicType,
700
+ graphicValue = _this$state4.graphicValue,
701
+ olProps = _this$state4.olProps,
702
+ isChangeMapType = _this$state4.isChangeMapType,
703
+ currentMap = _this$state4.currentMap,
704
+ showControl = _this$state4.showControl,
705
+ coverageType = _this$state4.coverageType,
706
+ customNodes = _this$state4.customNodes;
799
707
  var InputProps = {
800
708
  style: {
801
709
  'width': '200px'
@@ -820,11 +728,9 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
820
728
  isDoEdit: !_this7.multiDraw,
821
729
  isDraw: _this7.multiDraw
822
730
  };
823
-
824
731
  if (!_this7.multiDraw && (obj.geometryType == 'polyline' || obj.geometryType == 'polygon')) {
825
732
  objparam.editGraphicId = obj.id;
826
733
  }
827
-
828
734
  _this7.setState(objparam);
829
735
  },
830
736
  mapDraw: {
@@ -856,51 +762,42 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
856
762
  }
857
763
  };
858
764
  var mapPoints = [],
859
- mapLines = [],
860
- mapPolygons = [],
861
- mapCircles = [];
862
-
765
+ mapLines = [],
766
+ mapPolygons = [],
767
+ mapCircles = [];
863
768
  if (graphicType == 'point') {
864
769
  mapPoints = [].concat(_toConsumableArray(locationPoint), _toConsumableArray(listPoint));
865
770
  } else {
866
771
  mapPoints = _toConsumableArray(listPoint);
867
772
  }
868
-
869
773
  if (graphicType === 'polygon') {
870
774
  if (editGraphic) {
871
775
  var _mapPolygons;
872
-
873
776
  Array.isArray(editGraphic) ? (_mapPolygons = mapPolygons).push.apply(_mapPolygons, _toConsumableArray(editGraphic)) : mapPolygons.push(editGraphic);
874
777
  !this.multiDraw && (drawProps = null);
875
778
  }
876
779
  }
877
-
878
780
  if (graphicType === 'polyline') {
879
781
  if (editGraphic) {
880
782
  var _mapLines;
881
-
882
783
  Array.isArray(editGraphic) ? (_mapLines = mapLines).push.apply(_mapLines, _toConsumableArray(editGraphic)) : mapLines.push(editGraphic);
883
784
  !this.multiDraw && (drawProps = null);
884
785
  }
885
786
  }
886
-
887
787
  if (graphicType === 'rectangle') {
888
788
  if (editGraphic) {
889
789
  mapPolygons.push(editGraphic);
890
790
  drawProps = null;
891
791
  }
892
792
  }
893
-
894
793
  if (graphicType === 'circle') {
895
794
  if (editGraphic) {
896
795
  mapCircles.push(editGraphic);
897
796
  drawProps = null;
898
797
  }
899
798
  }
900
-
901
799
  if (isShowOtherGraph) {
902
800
  var otherGraph = this.props.otherGraph;
903
-
904
801
  if (otherGraph) {
905
802
  mapPoints = [].concat(_toConsumableArray(mapPoints), _toConsumableArray(otherGraph.point || []));
906
803
  mapLines = [].concat(_toConsumableArray(mapLines), _toConsumableArray(otherGraph.polyline || []));
@@ -908,7 +805,6 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
908
805
  mapCircles = [].concat(_toConsumableArray(mapCircles), _toConsumableArray(otherGraph.circle || []));
909
806
  }
910
807
  }
911
-
912
808
  return /*#__PURE__*/_react["default"].createElement(_VtxModal.VtxModal, {
913
809
  title: this.state.graphicType == 'point' ? "定位" : "绘制",
914
810
  style: {
@@ -930,10 +826,8 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
930
826
  onClick: function onClick() {
931
827
  if (_this7.multiDraw && _this7.state.isDoEdit && !_this7.state.isEndEdit) {
932
828
  _this7.continueDraw(_this7.callback.bind(_this7));
933
-
934
829
  return;
935
830
  }
936
-
937
831
  _this7.callback();
938
832
  },
939
833
  icon: getIcon('check')
@@ -965,16 +859,14 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
965
859
  disabled: this.isDrawStatus,
966
860
  onClick: function onClick() {
967
861
  _this7.isDrawStatus = true;
968
-
969
862
  if (_this7.multiDraw) {
970
863
  _this7.clickable = false;
971
- graphicValue === null || graphicValue === void 0 ? void 0 : graphicValue.forEach(function (item) {
864
+ graphicValue === null || graphicValue === void 0 || graphicValue.forEach(function (item) {
972
865
  return t.map.removeGraphic(item.id, 'draw');
973
866
  });
974
- editGraphic === null || editGraphic === void 0 ? void 0 : editGraphic.forEach(function (item) {
867
+ editGraphic === null || editGraphic === void 0 || editGraphic.forEach(function (item) {
975
868
  return t.map.removeGraphic(item.id, 'draw');
976
869
  });
977
-
978
870
  _this7.setState({
979
871
  isDraw: false,
980
872
  isCloseDraw: true,
@@ -1001,7 +893,6 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
1001
893
  });
1002
894
  });
1003
895
  }
1004
-
1005
896
  _this7.callback('editDraw');
1006
897
  },
1007
898
  icon: getIcon('edit')
@@ -1031,7 +922,6 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
1031
922
  onClick: function onClick(_ref) {
1032
923
  var key = _ref.key;
1033
924
  console.log(key);
1034
-
1035
925
  _this7.setState({
1036
926
  coverageType: key
1037
927
  });
@@ -1126,15 +1016,11 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
1126
1016
  key: "initSearchMap",
1127
1017
  value: function initSearchMap() {
1128
1018
  var _this8 = this;
1129
-
1130
- if (this.props.modal1Visible
1131
- /*&& !this.state.locationPoint[0]*/
1132
- ) {
1019
+ if (this.props.modal1Visible /*&& !this.state.locationPoint[0]*/) {
1133
1020
  if (this.map) {
1134
1021
  this.map.loadMapComplete.then(function () {
1135
1022
  if (!_this8.mapLoaded) {
1136
1023
  _this8.mapLoaded = true;
1137
-
1138
1024
  _this8.drawLocationPoint();
1139
1025
  }
1140
1026
  });
@@ -1157,20 +1043,16 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
1157
1043
  key: "componentWillReceiveProps",
1158
1044
  value: function componentWillReceiveProps(nextProps) {
1159
1045
  var _this9 = this;
1160
-
1161
1046
  var t = this;
1162
1047
  this.isClickMap = false;
1163
-
1164
1048
  if (t.state.graphicType !== nextProps.graphicType && !!this.map) {
1165
1049
  this.map.clearAll();
1166
1050
  t.mapLoaded = false;
1167
1051
  t.isinit = true;
1168
1052
  }
1169
-
1170
1053
  if (nextProps.editParam) {
1171
1054
  t.mapLoaded = false;
1172
1055
  }
1173
-
1174
1056
  t.isDrawStatus = nextProps.graphicType !== 'point' && !nextProps.editParam;
1175
1057
  this.setState({
1176
1058
  modal1Visible: nextProps.modal1Visible,
@@ -1195,7 +1077,6 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
1195
1077
  //实现2+次进入时,清理数据
1196
1078
  if (nextProps.modal1Visible) {
1197
1079
  _this9.clearList();
1198
-
1199
1080
  _this9.setState({
1200
1081
  setZoomLevel: true
1201
1082
  }, function () {
@@ -1203,39 +1084,27 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
1203
1084
  setZoomLevel: false
1204
1085
  });
1205
1086
  });
1206
-
1207
1087
  if (!!_this9.map && !!_this9.state.locationPoint[0] && nextProps.mapCenter && !!nextProps.mapCenter[0]) {
1208
1088
  if (_this9.map.getGraphic('locationPoint')) {
1209
1089
  switch (nextProps.mapType) {
1210
1090
  case 'bmap':
1211
1091
  _this9.map.getGraphic('locationPoint').mapLayer.setPosition(new BMap.Point(nextProps.mapCenter[0], nextProps.mapCenter[1]));
1212
-
1213
1092
  break;
1214
-
1215
1093
  case 'amap':
1216
1094
  _this9.map.getGraphic('locationPoint').mapLayer.setPosition(new AMap.LngLat(nextProps.mapCenter[0], nextProps.mapCenter[1]));
1217
-
1218
1095
  break;
1219
-
1220
1096
  case 'tmap':
1221
1097
  _this9.map.getGraphic('locationPoint').mapLayer.setLngLat(new T.LngLat(nextProps.mapCenter[0], nextProps.mapCenter[1]));
1222
-
1223
1098
  break;
1224
-
1225
1099
  case 'gmap':
1226
1100
  _this9.map.getGraphic('locationPoint').mapLayer.geometry.setLatitude(nextProps.mapCenter[1]);
1227
-
1228
1101
  _this9.map.getGraphic('locationPoint').mapLayer.geometry.setLongitude(nextProps.mapCenter[0]);
1229
-
1230
1102
  _this9.map.state.gis.graphics.refresh();
1231
-
1232
1103
  case 'olMap':
1233
1104
  _this9.map.getGraphic('locationPoint').mapLayer.setGeometry(new ol.geom.Point(nextProps.mapCenter));
1234
-
1235
1105
  break;
1236
1106
  }
1237
1107
  }
1238
-
1239
1108
  _this9.map.setCenter(nextProps.mapCenter);
1240
1109
  }
1241
1110
  }
@@ -1246,17 +1115,13 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
1246
1115
  value: function componentWillUnmount() {
1247
1116
  //关闭moveTo定时
1248
1117
  var t = this;
1249
-
1250
1118
  if (t.loadExtent) {
1251
1119
  clearInterval(t.loadExtent);
1252
1120
  }
1253
1121
  }
1254
1122
  }]);
1255
-
1256
1123
  return VtxSearchMap;
1257
1124
  }(_react["default"].Component);
1258
-
1259
- var _default = VtxSearchMap;
1260
- exports["default"] = _default;
1125
+ var _default = exports["default"] = VtxSearchMap;
1261
1126
  module.exports = exports["default"];
1262
1127
  //# sourceMappingURL=VtxSearchMap.js.map