@vtx/map 1.1.47 → 1.1.49

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