@vtx/map 1.1.41 → 1.1.43

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 (63) 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 +696 -1204
  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 +91 -219
  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/package.json +3 -3
@@ -1,80 +1,46 @@
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 _radio = _interopRequireDefault(require("antd/lib/radio"));
21
-
22
14
  var _popover = _interopRequireDefault(require("antd/lib/popover"));
23
-
24
15
  var _VtxModal = require("../VtxModal");
25
-
26
16
  var _VtxMap = require("../VtxMap");
27
-
28
17
  var _default2 = _interopRequireWildcard(require("../default"));
29
-
30
18
  var _mapping = require("./mapping");
31
-
32
- 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); }
33
-
34
- 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; }
35
-
19
+ 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); }
20
+ 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; }
36
21
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
37
-
38
22
  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); }
39
-
40
- 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; }
41
-
42
- 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; }
43
-
23
+ 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; }
24
+ 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; }
44
25
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
45
-
46
- 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); } }
47
-
26
+ 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); } }
48
27
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
49
-
50
28
  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); }
51
-
52
29
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
53
-
54
30
  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); }; }
55
-
56
31
  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); }
57
-
58
32
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
59
-
60
33
  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; } }
61
-
62
34
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
63
-
64
- 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; }
65
-
35
+ 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; }
36
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
37
+ 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); }
66
38
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
67
-
68
39
  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."); }
69
-
70
40
  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); }
71
-
72
41
  function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
73
-
74
42
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
75
-
76
- 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; }
77
-
43
+ 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; } //公共地址配置
78
44
  var styles = {
79
45
  searchModal: "vtx-ui-searchmap-searchmodal",
80
46
  searchMap: "vtx-ui-searchmap-searchmap",
@@ -96,18 +62,17 @@ var styles = {
96
62
  hiddenLabel: "vtx-ui-searchmap-hiddenlabel",
97
63
  otherModal: "vtx-ui-searchmap-othermodal",
98
64
  mapTxt: 'vtx-ui-searchmap-mapTxt'
99
- }; // message.config({
65
+ };
66
+
67
+ // message.config({
100
68
  // top: document.getElementById('root').offsetHeight/3,
101
69
  // duration: 5,
102
70
  // });
103
-
104
71
  var warning = function warning() {
105
72
  _message["default"].warning("位置点查询失败,请缩小比例尺或切换关键字后再重新查询!");
106
73
  };
107
-
108
74
  function distinct(ary) {
109
75
  var pts = _toConsumableArray(ary);
110
-
111
76
  if (pts[0][0] == pts[pts.length - 1][0] && pts[0][1] == pts[pts.length - 1][1]) {
112
77
  pts.pop();
113
78
  return distinct(pts);
@@ -115,31 +80,24 @@ function distinct(ary) {
115
80
  return pts;
116
81
  }
117
82
  }
118
-
119
83
  var getIcon = function getIcon(type) {
120
84
  return _default2.antdMajorVersion === "4" ? /*#__PURE__*/_react["default"].createElement(_default2.VtxMapIcon, {
121
85
  type: "icon-".concat(_mapping.iconMapping[type])
122
86
  }) : type;
123
87
  };
124
-
125
88
  var VtxSearchCheckMap = /*#__PURE__*/function (_React$Component) {
126
89
  _inherits(VtxSearchCheckMap, _React$Component);
127
-
128
90
  var _super = _createSuper(VtxSearchCheckMap);
129
-
130
91
  function VtxSearchCheckMap(props) {
131
92
  var _this;
132
-
133
93
  _classCallCheck(this, VtxSearchCheckMap);
134
-
135
94
  _this = _super.call(this, props);
136
-
95
+ // 绘制多个图元时返回参数
137
96
  _defineProperty(_assertThisInitialized(_this), "getMultiRes", function (graphicType) {
138
97
  var resData = [];
139
98
  var _this$state = _this.state,
140
- graphicValue = _this$state.graphicValue,
141
- editGraphic = _this$state.editGraphic;
142
-
99
+ graphicValue = _this$state.graphicValue,
100
+ editGraphic = _this$state.editGraphic;
143
101
  switch (graphicType) {
144
102
  case "polygon":
145
103
  [].concat(_toConsumableArray(graphicValue || []), _toConsumableArray(editGraphic || [])).forEach(function (item) {
@@ -149,25 +107,21 @@ var VtxSearchCheckMap = /*#__PURE__*/function (_React$Component) {
149
107
  });
150
108
  });
151
109
  break;
152
-
153
110
  default:
154
111
  break;
155
112
  }
156
-
157
113
  return resData.length ? resData : null;
158
114
  });
159
-
160
115
  _this.map = null; //Map组件的ref对象
161
-
162
116
  _this.mapLoaded = false;
163
117
  _this.isDrawStatus = false;
164
118
  _this.isClickMap = false;
165
119
  _this.apid = []; //所有点id,除编辑点外
166
-
167
120
  _this.loadExtent = null;
168
121
  _this.mapId = "searchMap".concat(new Date().getTime());
169
122
  _this.multiDraw = props.multiDraw && ["polygon"].includes(props.graphicType);
170
- _this.clickable = false, // 多个面绘制时,是否可以点击面进行编辑
123
+ _this.clickable = false,
124
+ // 多个面绘制时,是否可以点击面进行编辑
171
125
  _this.state = {
172
126
  //列表和地图宽度切换的动画需要
173
127
  isShowList: false,
@@ -186,7 +140,6 @@ var VtxSearchCheckMap = /*#__PURE__*/function (_React$Component) {
186
140
  graphicValue: _this.multiDraw ? [] : null,
187
141
  // 绘制图元id集合
188
142
  drawGraphID: _this.multiDraw ? ["drawnGraph"] : "drawnGraph",
189
-
190
143
  /*地图Api参数*/
191
144
  mapCenter: props.mapCenter || "",
192
145
  maxZoom: props.maxZoom,
@@ -207,7 +160,6 @@ var VtxSearchCheckMap = /*#__PURE__*/function (_React$Component) {
207
160
  editGraphic: _this.multiDraw ? [] : null,
208
161
  mapZoomLevel: props.mapZoomLevel || 11,
209
162
  setZoomLevel: false,
210
-
211
163
  /*modal参数*/
212
164
  modal1Visible: props.modal1Visible || false,
213
165
  isShowOther: props.isShowOther || false,
@@ -222,31 +174,25 @@ var VtxSearchCheckMap = /*#__PURE__*/function (_React$Component) {
222
174
  currentMap: 'normal'
223
175
  };
224
176
  return _this;
225
- } // 绘制多个图元时返回参数
226
-
227
-
177
+ }
228
178
  _createClass(VtxSearchCheckMap, [{
229
179
  key: "callback",
230
- value: //经纬度回调
180
+ value:
181
+ //经纬度回调
231
182
  function callback() {
232
183
  var fun = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "callback";
233
-
234
184
  if (fun in this.props && typeof this.props[fun] === "function") {
235
185
  var editGraphicId = this.state.editGraphicId;
236
-
237
186
  switch (this.state.graphicType) {
238
187
  case "point":
239
188
  var locationPoint = this.state.locationPoint;
240
-
241
189
  if (this.map.getGraphic("locationPoint")) {
242
190
  var p = this.map.getGraphic(locationPoint[0].id).geometry;
243
191
  this.props[fun]([p.x, p.y]);
244
192
  } else {
245
193
  return [];
246
194
  }
247
-
248
195
  break;
249
-
250
196
  case "circle":
251
197
  this.props[fun](this.state.graphicValue ? {
252
198
  x: this.state.graphicValue.geometry.x,
@@ -255,16 +201,13 @@ var VtxSearchCheckMap = /*#__PURE__*/function (_React$Component) {
255
201
  area: this.state.graphicValue.area
256
202
  } : null);
257
203
  break;
258
-
259
204
  case "polygon":
260
205
  if (this.multiDraw) {
261
206
  this.props[fun](this.getMultiRes("polygon"));
262
207
  return;
263
208
  }
264
-
265
209
  if (this.map.getGraphic(editGraphicId)) {
266
210
  var _p = this.map.getGraphic(editGraphicId);
267
-
268
211
  this.props[fun]({
269
212
  rings: distinct(_p.geometry.rings),
270
213
  area: this.map.getPolygonArea(distinct(_p.geometry.rings))
@@ -275,20 +218,16 @@ var VtxSearchCheckMap = /*#__PURE__*/function (_React$Component) {
275
218
  area: this.state.graphicValue.area
276
219
  } : null);
277
220
  }
278
-
279
221
  break;
280
-
281
222
  case "rectangle":
282
223
  this.props[fun](this.state.graphicValue ? {
283
224
  rings: distinct(this.state.graphicValue.geometry.rings),
284
225
  area: this.state.graphicValue.area
285
226
  } : null);
286
227
  break;
287
-
288
228
  case "polyline":
289
229
  if (this.map.getGraphic(editGraphicId)) {
290
230
  var _p2 = this.map.getGraphic(editGraphicId);
291
-
292
231
  this.props[fun]({
293
232
  paths: _p2.geometry.paths,
294
233
  length: this.map.calculateDistance(_p2.geometry.paths)
@@ -299,11 +238,9 @@ var VtxSearchCheckMap = /*#__PURE__*/function (_React$Component) {
299
238
  length: this.map.calculateDistance(this.state.graphicValue.geometry.paths)
300
239
  } : null);
301
240
  }
302
-
303
241
  break;
304
242
  }
305
243
  }
306
-
307
244
  if (this.props.clearDrawnGraph) {
308
245
  this.clearDrawnGraph();
309
246
  }
@@ -314,18 +251,17 @@ var VtxSearchCheckMap = /*#__PURE__*/function (_React$Component) {
314
251
  this.setState({
315
252
  isShowList: bealoon
316
253
  });
317
- } //绘制定位点(以当前的中心点位参照 => 同时开启点位编辑)
318
-
254
+ }
255
+ //绘制定位点(以当前的中心点位参照 => 同时开启点位编辑)
319
256
  }, {
320
257
  key: "drawLocationPoint",
321
258
  value: function drawLocationPoint() {
322
- var t = this; //判断arcgis,是: 判断中心点是否已经确定,确定,继续走逻辑.不确认.轮询等待
323
-
259
+ var t = this;
260
+ //判断arcgis,是: 判断中心点是否已经确定,确定,继续走逻辑.不确认.轮询等待
324
261
  if (this.props.mapType !== "gmap" || this.map.state.gis.extent && !!this.map.state.gis.extent.xmax) {
325
262
  var lglt = this.map.getMapExtent(),
326
- editGraphic = null,
327
- editGraphicId = "locationPoint";
328
-
263
+ editGraphic = null,
264
+ editGraphicId = "locationPoint";
329
265
  if (!this.multiDraw && this.props.editParam) {
330
266
  // && (this.props.graphicType == 'polyline' || this.props.graphicType == 'polygon')
331
267
  editGraphic = _objectSpread(_objectSpread({}, this.props.editParam), {}, {
@@ -333,7 +269,6 @@ var VtxSearchCheckMap = /*#__PURE__*/function (_React$Component) {
333
269
  });
334
270
  editGraphicId = "drawnGraph";
335
271
  }
336
-
337
272
  if (this.multiDraw && Array.isArray(this.props.editParam) && this.props.editParam.length) {
338
273
  // && (this.props.graphicType == 'polyline' || this.props.graphicType == 'polygon')
339
274
  editGraphic = this.props.editParam.map(function (item, index) {
@@ -343,7 +278,6 @@ var VtxSearchCheckMap = /*#__PURE__*/function (_React$Component) {
343
278
  });
344
279
  editGraphicId = null;
345
280
  }
346
-
347
281
  this.isinit = false;
348
282
  this.setState({
349
283
  editGraphic: editGraphic,
@@ -374,53 +308,51 @@ var VtxSearchCheckMap = /*#__PURE__*/function (_React$Component) {
374
308
  t.drawLocationPoint();
375
309
  }, 50);
376
310
  }
377
- } //校正定位的点位位置到当前的中心点
378
-
311
+ }
312
+ //校正定位的点位位置到当前的中心点
379
313
  }, {
380
314
  key: "correction",
381
315
  value: function correction() {
382
- var t = this; //获取当前中心点经纬度
383
-
316
+ var t = this;
317
+ //获取当前中心点经纬度
384
318
  var lglt = this.map.getMapExtent();
385
319
  var _t$state = t.state,
386
- locationPoint = _t$state.locationPoint,
387
- checkValue = _t$state.checkValue;
320
+ locationPoint = _t$state.locationPoint,
321
+ checkValue = _t$state.checkValue;
388
322
  locationPoint = locationPoint.map(function (item, index) {
389
323
  return _objectSpread(_objectSpread({}, item), {}, {
390
324
  longitude: lglt.nowCenter.lng,
391
325
  latitude: lglt.nowCenter.lat
392
326
  });
393
327
  });
394
- this.map.updatePoint(locationPoint); // 若坐标反查选中,校正是需要更新输入框中的经纬度
395
-
328
+ this.map.updatePoint(locationPoint);
329
+ // 若坐标反查选中,校正是需要更新输入框中的经纬度
396
330
  if (checkValue) this.setState({
397
331
  searchValue: "".concat(lglt.nowCenter.lng, ",").concat(lglt.nowCenter.lat)
398
332
  });
399
- } //搜索关键字切换
400
-
333
+ }
334
+ //搜索关键字切换
401
335
  }, {
402
336
  key: "changeValue",
403
337
  value: function changeValue(e) {
404
338
  this.setState({
405
339
  searchValue: e.target.value
406
340
  });
407
- } //根据关键字搜索数据
408
-
341
+ }
342
+ //根据关键字搜索数据
409
343
  }, {
410
344
  key: "searchList",
411
345
  value: function searchList() {
412
346
  //因为antd组件问题,这边使用手动关键位,控制方法执行
413
347
  var t = this;
414
-
415
348
  if (!this.state.checkValue) {
416
349
  // 非点位并且点位非坐标反查时
417
350
  var searchPoints = t.map.searchPoints(this.state.searchValue);
418
351
  searchPoints.then(function (results) {
419
352
  if (results.length > 0) {
420
353
  var lsp = [],
421
- lsm = [];
354
+ lsm = [];
422
355
  t.apid = [];
423
-
424
356
  for (var i = 0; i < results.length; i++) {
425
357
  var r = results[i];
426
358
  lsp.push(_objectSpread(_objectSpread({}, results[i]), {}, {
@@ -435,7 +367,6 @@ var VtxSearchCheckMap = /*#__PURE__*/function (_React$Component) {
435
367
  });
436
368
  t.apid.push(r.id);
437
369
  }
438
-
439
370
  t.setState({
440
371
  listPoint: lsp,
441
372
  listMess: lsm,
@@ -448,30 +379,23 @@ var VtxSearchCheckMap = /*#__PURE__*/function (_React$Component) {
448
379
  });
449
380
  } else {
450
381
  var _this$state$searchVal;
451
-
452
382
  // 点位弹框并坐标反查情况
453
- var lnglats = (_this$state$searchVal = this.state.searchValue) === null || _this$state$searchVal === void 0 ? void 0 : _this$state$searchVal.split(","); // 英文逗号分割,若长度为不为2,表示数据格式错误
454
-
383
+ var lnglats = (_this$state$searchVal = this.state.searchValue) === null || _this$state$searchVal === void 0 ? void 0 : _this$state$searchVal.split(",");
384
+ // 英文逗号分割,若长度为不为2,表示数据格式错误
455
385
  if ((lnglats === null || lnglats === void 0 ? void 0 : lnglats.length) !== 2) {
456
386
  _message["default"].warning("请按正确的经纬度格式输入,经度在前,用英文逗号隔开!");
457
-
458
387
  return;
459
- } // 经纬度分别正则校验
460
-
461
-
388
+ }
389
+ // 经纬度分别正则校验
462
390
  if (!new RegExp(/^[\-\+]?(0(\.\d{1,15})?|([1-9](\d)?)(\.\d{1,15})?|1[0-7]\d{1}(\.\d{1,15})?|180\.0{1,15})$/).test(lnglats[0])) {
463
391
  _message["default"].warning("请输入正确格式经度!");
464
-
465
392
  return;
466
393
  }
467
-
468
394
  if (!new RegExp(/^[\-\+]?((0|([1-8]\d?))(\.\d{1,15})?|90(\.0{1,15})?)$/).test(lnglats[1])) {
469
395
  _message["default"].warning("请输入正确格式纬度!");
470
-
471
396
  return;
472
- } // 正确的经纬度作为地图中心点
473
-
474
-
397
+ }
398
+ // 正确的经纬度作为地图中心点
475
399
  var centerPoint = [{
476
400
  id: "locationPoint",
477
401
  longitude: lnglats[0],
@@ -488,13 +412,12 @@ var VtxSearchCheckMap = /*#__PURE__*/function (_React$Component) {
488
412
  });
489
413
  this.map.updatePoint(centerPoint);
490
414
  }
491
- } //返回最佳位置(zoom,center)
492
-
415
+ }
416
+ //返回最佳位置(zoom,center)
493
417
  }, {
494
418
  key: "setFitView",
495
419
  value: function setFitView() {
496
420
  var _this2 = this;
497
-
498
421
  this.setState({
499
422
  mapVisiblePoints: {
500
423
  fitView: this.apid,
@@ -506,8 +429,8 @@ var VtxSearchCheckMap = /*#__PURE__*/function (_React$Component) {
506
429
  setVisiblePoints: false
507
430
  });
508
431
  });
509
- } //清空列表的所有数据(包括点位)
510
-
432
+ }
433
+ //清空列表的所有数据(包括点位)
511
434
  }, {
512
435
  key: "clearList",
513
436
  value: function clearList() {
@@ -518,15 +441,15 @@ var VtxSearchCheckMap = /*#__PURE__*/function (_React$Component) {
518
441
  listMess: [],
519
442
  isShowList: false
520
443
  });
521
- } //列表选中地址
522
-
444
+ }
445
+ //列表选中地址
523
446
  }, {
524
447
  key: "chooseAddress",
525
448
  value: function chooseAddress(id) {
526
449
  var t = this;
527
450
  var _this$state2 = this.state,
528
- listPoint = _this$state2.listPoint,
529
- listMess = _this$state2.listMess;
451
+ listPoint = _this$state2.listPoint,
452
+ listMess = _this$state2.listMess;
530
453
  var mapCenter = [];
531
454
  listPoint = listPoint.map(function (item, index) {
532
455
  if (item.id === id) {
@@ -562,7 +485,6 @@ var VtxSearchCheckMap = /*#__PURE__*/function (_React$Component) {
562
485
  t.setState({
563
486
  setCenter: false
564
487
  });
565
-
566
488
  if (t.state.graphicType == "point") {
567
489
  t.correction();
568
490
  }
@@ -572,14 +494,11 @@ var VtxSearchCheckMap = /*#__PURE__*/function (_React$Component) {
572
494
  key: "clickGraphic",
573
495
  value: function clickGraphic(obj) {
574
496
  var _this3 = this;
575
-
576
497
  if (obj.type === "point" && obj.attributes.other === "search") {
577
498
  this.chooseAddress(obj.attributes.id);
578
499
  }
579
-
580
500
  if (this.clickable && obj.type === "polygon") {
581
501
  var _obj$param$attributes;
582
-
583
502
  // 开启编辑
584
503
  this.setState({
585
504
  editGraphicId: obj.param.id || ((_obj$param$attributes = obj.param.attributes) === null || _obj$param$attributes === void 0 ? void 0 : _obj$param$attributes.id),
@@ -603,17 +522,16 @@ var VtxSearchCheckMap = /*#__PURE__*/function (_React$Component) {
603
522
  this.setState({
604
523
  modal1Visible: false
605
524
  });
606
- } // if(this.props.clearDrawnGraph){
607
-
608
-
609
- this.clearDrawnGraph(); // }
525
+ }
526
+ // if(this.props.clearDrawnGraph){
527
+ this.clearDrawnGraph();
528
+ // }
610
529
  }
611
530
  }
612
531
  }, {
613
532
  key: "clearDrawnGraph",
614
533
  value: function clearDrawnGraph() {
615
534
  var _this4 = this;
616
-
617
535
  this.isDrawStatus = true;
618
536
  this.setState({
619
537
  isDraw: this.state.graphicType !== "point",
@@ -629,7 +547,6 @@ var VtxSearchCheckMap = /*#__PURE__*/function (_React$Component) {
629
547
  key: "continueDraw",
630
548
  value: function continueDraw() {
631
549
  var _this5 = this;
632
-
633
550
  this.clickable = false;
634
551
  this.setState({
635
552
  isDraw: false,
@@ -648,15 +565,11 @@ var VtxSearchCheckMap = /*#__PURE__*/function (_React$Component) {
648
565
  key: "editGraphic",
649
566
  value: function editGraphic() {
650
567
  var _this6 = this;
651
-
652
568
  if (this.isDrawStatus && this.isClickMap) {
653
569
  _message["default"].warning("请双击结束图元编辑");
654
-
655
570
  return;
656
571
  }
657
-
658
572
  _message["default"].info("请点击图元进行编辑");
659
-
660
573
  this.clickable = true;
661
574
  this.isDrawStatus = false;
662
575
  this.setState({
@@ -675,18 +588,17 @@ var VtxSearchCheckMap = /*#__PURE__*/function (_React$Component) {
675
588
  key: "editGraphicChange",
676
589
  value: function editGraphicChange(obj) {
677
590
  var checkValue = this.state.checkValue;
678
- console.log(checkValue); // 若坐标反查选中
679
-
591
+ console.log(checkValue);
592
+ // 若坐标反查选中
680
593
  if (checkValue) {
681
594
  this.setState({
682
595
  searchValue: "".concat(obj.geometry.x, ",").concat(obj.geometry.y)
683
596
  });
684
597
  }
685
-
686
598
  if (!this.multiDraw) return;
687
599
  var _this$state3 = this.state,
688
- graphicValue = _this$state3.graphicValue,
689
- editGraphic = _this$state3.editGraphic;
600
+ graphicValue = _this$state3.graphicValue,
601
+ editGraphic = _this$state3.editGraphic;
690
602
  this.setState({
691
603
  graphicValue: (graphicValue || []).map(function (item) {
692
604
  return item.id === obj.id ? obj : item;
@@ -695,8 +607,8 @@ var VtxSearchCheckMap = /*#__PURE__*/function (_React$Component) {
695
607
  return item.id === obj.id ? obj : item;
696
608
  })
697
609
  });
698
- } // 点位反查
699
-
610
+ }
611
+ // 点位反查
700
612
  }, {
701
613
  key: "counterCheck",
702
614
  value: function counterCheck() {
@@ -714,7 +626,6 @@ var VtxSearchCheckMap = /*#__PURE__*/function (_React$Component) {
714
626
  currentMap: str
715
627
  });
716
628
  var layers = [];
717
-
718
629
  switch (mapType) {
719
630
  case 'amap':
720
631
  case 'bmap':
@@ -724,12 +635,9 @@ var VtxSearchCheckMap = /*#__PURE__*/function (_React$Component) {
724
635
  } else {
725
636
  t.map.setMapType('wx');
726
637
  }
727
-
728
638
  break;
729
-
730
639
  case 'gmap':
731
640
  break;
732
-
733
641
  default:
734
642
  break;
735
643
  }
@@ -738,41 +646,40 @@ var VtxSearchCheckMap = /*#__PURE__*/function (_React$Component) {
738
646
  key: "render",
739
647
  value: function render() {
740
648
  var _this7 = this;
741
-
742
649
  var t = this;
743
650
  var _this$state4 = this.state,
744
- isShowList = _this$state4.isShowList,
745
- searchValue = _this$state4.searchValue,
746
- locationPoint = _this$state4.locationPoint,
747
- listPoint = _this$state4.listPoint,
748
- listMess = _this$state4.listMess,
749
- mapZoomLevel = _this$state4.mapZoomLevel,
750
- setZoomLevel = _this$state4.setZoomLevel,
751
- maxZoom = _this$state4.maxZoom,
752
- minZoom = _this$state4.minZoom,
753
- wkid = _this$state4.wkid,
754
- mapServer = _this$state4.mapServer,
755
- mapCenter = _this$state4.mapCenter,
756
- setCenter = _this$state4.setCenter,
757
- mapType = _this$state4.mapType,
758
- mapStyle = _this$state4.mapStyle,
759
- mapVisiblePoints = _this$state4.mapVisiblePoints,
760
- setVisiblePoints = _this$state4.setVisiblePoints,
761
- isDoEdit = _this$state4.isDoEdit,
762
- editGraphicId = _this$state4.editGraphicId,
763
- isEndEdit = _this$state4.isEndEdit,
764
- modal1Visible = _this$state4.modal1Visible,
765
- drawGraphID = _this$state4.drawGraphID,
766
- isShowOther = _this$state4.isShowOther,
767
- otherText = _this$state4.otherText,
768
- isShowOtherGraph = _this$state4.isShowOtherGraph,
769
- editGraphic = _this$state4.editGraphic,
770
- graphicType = _this$state4.graphicType,
771
- graphicValue = _this$state4.graphicValue,
772
- olProps = _this$state4.olProps,
773
- checkValue = _this$state4.checkValue,
774
- isChangeMapType = _this$state4.isChangeMapType,
775
- currentMap = _this$state4.currentMap;
651
+ isShowList = _this$state4.isShowList,
652
+ searchValue = _this$state4.searchValue,
653
+ locationPoint = _this$state4.locationPoint,
654
+ listPoint = _this$state4.listPoint,
655
+ listMess = _this$state4.listMess,
656
+ mapZoomLevel = _this$state4.mapZoomLevel,
657
+ setZoomLevel = _this$state4.setZoomLevel,
658
+ maxZoom = _this$state4.maxZoom,
659
+ minZoom = _this$state4.minZoom,
660
+ wkid = _this$state4.wkid,
661
+ mapServer = _this$state4.mapServer,
662
+ mapCenter = _this$state4.mapCenter,
663
+ setCenter = _this$state4.setCenter,
664
+ mapType = _this$state4.mapType,
665
+ mapStyle = _this$state4.mapStyle,
666
+ mapVisiblePoints = _this$state4.mapVisiblePoints,
667
+ setVisiblePoints = _this$state4.setVisiblePoints,
668
+ isDoEdit = _this$state4.isDoEdit,
669
+ editGraphicId = _this$state4.editGraphicId,
670
+ isEndEdit = _this$state4.isEndEdit,
671
+ modal1Visible = _this$state4.modal1Visible,
672
+ drawGraphID = _this$state4.drawGraphID,
673
+ isShowOther = _this$state4.isShowOther,
674
+ otherText = _this$state4.otherText,
675
+ isShowOtherGraph = _this$state4.isShowOtherGraph,
676
+ editGraphic = _this$state4.editGraphic,
677
+ graphicType = _this$state4.graphicType,
678
+ graphicValue = _this$state4.graphicValue,
679
+ olProps = _this$state4.olProps,
680
+ checkValue = _this$state4.checkValue,
681
+ isChangeMapType = _this$state4.isChangeMapType,
682
+ currentMap = _this$state4.currentMap;
776
683
  var InputProps = {
777
684
  style: {
778
685
  width: "200px",
@@ -783,8 +690,8 @@ var VtxSearchCheckMap = /*#__PURE__*/function (_React$Component) {
783
690
  onChange: this.changeValue.bind(this),
784
691
  onPressEnter: this.searchList.bind(this),
785
692
  onKeyDown: this.changeValue.bind(this)
786
- }; // 经纬度反查输入框
787
-
693
+ };
694
+ // 经纬度反查输入框
788
695
  var checkInputProps = {
789
696
  style: {
790
697
  width: "200px",
@@ -810,11 +717,9 @@ var VtxSearchCheckMap = /*#__PURE__*/function (_React$Component) {
810
717
  isDoEdit: !_this7.multiDraw,
811
718
  isDraw: _this7.multiDraw
812
719
  };
813
-
814
720
  if (!_this7.multiDraw && (obj.geometryType == "polyline" || obj.geometryType == "polygon")) {
815
721
  objparam.editGraphicId = obj.id;
816
722
  }
817
-
818
723
  _this7.setState(objparam);
819
724
  },
820
725
  mapDraw: {
@@ -846,49 +751,41 @@ var VtxSearchCheckMap = /*#__PURE__*/function (_React$Component) {
846
751
  }
847
752
  };
848
753
  var mapPoints = [],
849
- mapLines = [],
850
- mapPolygons = [],
851
- mapCircles = [];
852
-
754
+ mapLines = [],
755
+ mapPolygons = [],
756
+ mapCircles = [];
853
757
  if (graphicType == "point") {
854
758
  mapPoints = [].concat(_toConsumableArray(locationPoint), _toConsumableArray(listPoint));
855
759
  } else {
856
760
  mapPoints = _toConsumableArray(listPoint);
857
761
  }
858
-
859
762
  if (graphicType === "polygon") {
860
763
  if (editGraphic) {
861
764
  var _mapPolygons;
862
-
863
765
  Array.isArray(editGraphic) ? (_mapPolygons = mapPolygons).push.apply(_mapPolygons, _toConsumableArray(editGraphic)) : mapPolygons.push(editGraphic);
864
766
  !this.multiDraw && (drawProps = null);
865
767
  }
866
768
  }
867
-
868
769
  if (graphicType === "polyline") {
869
770
  if (editGraphic) {
870
771
  mapLines.push(editGraphic);
871
772
  drawProps = null;
872
773
  }
873
774
  }
874
-
875
775
  if (graphicType === "rectangle") {
876
776
  if (editGraphic) {
877
777
  mapPolygons.push(editGraphic);
878
778
  drawProps = null;
879
779
  }
880
780
  }
881
-
882
781
  if (graphicType === "circle") {
883
782
  if (editGraphic) {
884
783
  mapCircles.push(editGraphic);
885
784
  drawProps = null;
886
785
  }
887
786
  }
888
-
889
787
  if (isShowOtherGraph) {
890
788
  var otherGraph = this.props.otherGraph;
891
-
892
789
  if (otherGraph) {
893
790
  mapPoints = [].concat(_toConsumableArray(mapPoints), _toConsumableArray(otherGraph.point || []));
894
791
  mapLines = [].concat(_toConsumableArray(mapLines), _toConsumableArray(otherGraph.polyline || []));
@@ -896,7 +793,6 @@ var VtxSearchCheckMap = /*#__PURE__*/function (_React$Component) {
896
793
  mapCircles = [].concat(_toConsumableArray(mapCircles), _toConsumableArray(otherGraph.circle || []));
897
794
  }
898
795
  }
899
-
900
796
  var mapTypeContent = /*#__PURE__*/_react["default"].createElement("div", {
901
797
  style: {
902
798
  width: '170px',
@@ -932,7 +828,6 @@ var VtxSearchCheckMap = /*#__PURE__*/function (_React$Component) {
932
828
  }, /*#__PURE__*/_react["default"].createElement("img", {
933
829
  src: "".concat(_default2["default"].mapServerURL, "/images/wx.png")
934
830
  })));
935
-
936
831
  return /*#__PURE__*/_react["default"].createElement(_VtxModal.VtxModal, {
937
832
  title: this.state.graphicType == "point" ? "定位" : "绘制",
938
833
  style: {
@@ -986,16 +881,14 @@ var VtxSearchCheckMap = /*#__PURE__*/function (_React$Component) {
986
881
  disabled: this.isDrawStatus,
987
882
  onClick: function onClick() {
988
883
  _this7.isDrawStatus = true;
989
-
990
884
  if (_this7.multiDraw) {
991
885
  _this7.clickable = false;
992
- graphicValue === null || graphicValue === void 0 ? void 0 : graphicValue.forEach(function (item) {
886
+ graphicValue === null || graphicValue === void 0 || graphicValue.forEach(function (item) {
993
887
  return t.map.removeGraphic(item.id, "draw");
994
888
  });
995
- editGraphic === null || editGraphic === void 0 ? void 0 : editGraphic.forEach(function (item) {
889
+ editGraphic === null || editGraphic === void 0 || editGraphic.forEach(function (item) {
996
890
  return t.map.removeGraphic(item.id, "draw");
997
891
  });
998
-
999
892
  _this7.setState({
1000
893
  isDraw: false,
1001
894
  isCloseDraw: true,
@@ -1022,7 +915,6 @@ var VtxSearchCheckMap = /*#__PURE__*/function (_React$Component) {
1022
915
  });
1023
916
  });
1024
917
  }
1025
-
1026
918
  _this7.callback("editDraw");
1027
919
  },
1028
920
  icon: getIcon("edit")
@@ -1126,15 +1018,11 @@ var VtxSearchCheckMap = /*#__PURE__*/function (_React$Component) {
1126
1018
  key: "initSearchMap",
1127
1019
  value: function initSearchMap() {
1128
1020
  var _this8 = this;
1129
-
1130
- if (this.props.modal1Visible
1131
- /*&& !this.state.locationPoint[0]*/
1132
- ) {
1021
+ if (this.props.modal1Visible /*&& !this.state.locationPoint[0]*/) {
1133
1022
  if (this.map) {
1134
1023
  this.map.loadMapComplete.then(function () {
1135
1024
  if (!_this8.mapLoaded) {
1136
1025
  _this8.mapLoaded = true;
1137
-
1138
1026
  _this8.drawLocationPoint();
1139
1027
  }
1140
1028
  });
@@ -1157,20 +1045,16 @@ var VtxSearchCheckMap = /*#__PURE__*/function (_React$Component) {
1157
1045
  key: "componentWillReceiveProps",
1158
1046
  value: function componentWillReceiveProps(nextProps) {
1159
1047
  var _this9 = this;
1160
-
1161
1048
  var t = this;
1162
1049
  this.isClickMap = false;
1163
-
1164
1050
  if (t.state.graphicType !== nextProps.graphicType && !!this.map) {
1165
1051
  this.map.clearAll();
1166
1052
  t.mapLoaded = false;
1167
1053
  t.isinit = true;
1168
1054
  }
1169
-
1170
1055
  if (nextProps.editParam) {
1171
1056
  t.mapLoaded = false;
1172
1057
  }
1173
-
1174
1058
  t.isDrawStatus = nextProps.graphicType !== "point" && !nextProps.editParam;
1175
1059
  this.setState({
1176
1060
  modal1Visible: nextProps.modal1Visible,
@@ -1195,7 +1079,6 @@ var VtxSearchCheckMap = /*#__PURE__*/function (_React$Component) {
1195
1079
  //实现2+次进入时,清理数据
1196
1080
  if (nextProps.modal1Visible) {
1197
1081
  _this9.clearList();
1198
-
1199
1082
  _this9.setState({
1200
1083
  setZoomLevel: true
1201
1084
  }, function () {
@@ -1203,39 +1086,27 @@ var VtxSearchCheckMap = /*#__PURE__*/function (_React$Component) {
1203
1086
  setZoomLevel: false
1204
1087
  });
1205
1088
  });
1206
-
1207
1089
  if (!!_this9.map && !!_this9.state.locationPoint[0] && nextProps.mapCenter && !!nextProps.mapCenter[0]) {
1208
1090
  if (_this9.map.getGraphic("locationPoint")) {
1209
1091
  switch (nextProps.mapType) {
1210
1092
  case "bmap":
1211
1093
  _this9.map.getGraphic("locationPoint").mapLayer.setPosition(new BMap.Point(nextProps.mapCenter[0], nextProps.mapCenter[1]));
1212
-
1213
1094
  break;
1214
-
1215
1095
  case "amap":
1216
1096
  _this9.map.getGraphic("locationPoint").mapLayer.setPosition(new AMap.LngLat(nextProps.mapCenter[0], nextProps.mapCenter[1]));
1217
-
1218
1097
  break;
1219
-
1220
1098
  case "tmap":
1221
1099
  _this9.map.getGraphic("locationPoint").mapLayer.setLngLat(new T.LngLat(nextProps.mapCenter[0], nextProps.mapCenter[1]));
1222
-
1223
1100
  break;
1224
-
1225
1101
  case "gmap":
1226
1102
  _this9.map.getGraphic("locationPoint").mapLayer.geometry.setLatitude(nextProps.mapCenter[1]);
1227
-
1228
1103
  _this9.map.getGraphic("locationPoint").mapLayer.geometry.setLongitude(nextProps.mapCenter[0]);
1229
-
1230
1104
  _this9.map.state.gis.graphics.refresh();
1231
-
1232
1105
  case "olMap":
1233
1106
  _this9.map.getGraphic("locationPoint").mapLayer.setGeometry(new ol.geom.Point(nextProps.mapCenter));
1234
-
1235
1107
  break;
1236
1108
  }
1237
1109
  }
1238
-
1239
1110
  _this9.map.setCenter(nextProps.mapCenter);
1240
1111
  }
1241
1112
  }
@@ -1246,17 +1117,13 @@ var VtxSearchCheckMap = /*#__PURE__*/function (_React$Component) {
1246
1117
  value: function componentWillUnmount() {
1247
1118
  //关闭moveTo定时
1248
1119
  var t = this;
1249
-
1250
1120
  if (t.loadExtent) {
1251
1121
  clearInterval(t.loadExtent);
1252
1122
  }
1253
1123
  }
1254
1124
  }]);
1255
-
1256
1125
  return VtxSearchCheckMap;
1257
1126
  }(_react["default"].Component);
1258
-
1259
- var _default = VtxSearchCheckMap;
1260
- exports["default"] = _default;
1127
+ var _default = exports["default"] = VtxSearchCheckMap;
1261
1128
  module.exports = exports["default"];
1262
1129
  //# sourceMappingURL=VtxSearchCheckMap.js.map