@vtx/map 1.2.38 → 2.0.0-beta.2

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 (60) hide show
  1. package/README.md +44 -44
  2. package/lib/VtxMap/AMap/AMap.js +37 -35
  3. package/lib/VtxMap/AMap/AMap.js.map +1 -1
  4. package/lib/VtxMap/BMap/Map.js +60 -57
  5. package/lib/VtxMap/BMap/Map.js.map +1 -1
  6. package/lib/VtxMap/GMap/Map.js +38 -39
  7. package/lib/VtxMap/GMap/Map.js.map +1 -1
  8. package/lib/VtxMap/MapToolFunction.js +0 -9
  9. package/lib/VtxMap/MapToolFunction.js.map +1 -1
  10. package/lib/VtxMap/OMap/Map.js +65 -62
  11. package/lib/VtxMap/OMap/Map.js.map +1 -1
  12. package/lib/VtxMap/OMap/Map.less +70 -70
  13. package/lib/VtxMap/OlMap/Map.js +77 -101
  14. package/lib/VtxMap/OlMap/Map.js.map +1 -1
  15. package/lib/VtxMap/OlMap/Map.less +230 -230
  16. package/lib/VtxMap/TMap/TMap.js +58 -56
  17. package/lib/VtxMap/TMap/TMap.js.map +1 -1
  18. package/lib/VtxMap/index.js +0 -18
  19. package/lib/VtxMap/index.js.map +1 -1
  20. package/lib/VtxMap/optimizingPointMap.js +21 -23
  21. package/lib/VtxMap/optimizingPointMap.js.map +1 -1
  22. package/lib/VtxModal/VtxModal.css +76 -18
  23. package/lib/VtxModal/VtxModal.js +16 -13
  24. package/lib/VtxModal/VtxModal.js.map +1 -1
  25. package/lib/VtxModal/VtxModal.less +117 -50
  26. package/lib/VtxModal/style/css.js +1 -12
  27. package/lib/VtxModal/style/css.js.map +1 -1
  28. package/lib/VtxModal/style/index.js +1 -12
  29. package/lib/VtxModal/style/index.js.map +1 -1
  30. package/lib/VtxSearchCheckMap/VtxSearchCheckMap.css +45 -63
  31. package/lib/VtxSearchCheckMap/VtxSearchCheckMap.js +35 -36
  32. package/lib/VtxSearchCheckMap/VtxSearchCheckMap.js.map +1 -1
  33. package/lib/VtxSearchCheckMap/VtxSearchCheckMap.less +73 -68
  34. package/lib/VtxSearchCheckMap/index.js.map +1 -1
  35. package/lib/VtxSearchCheckMap/mapping.js.map +1 -1
  36. package/lib/VtxSearchCheckMap/style/css.js +2 -18
  37. package/lib/VtxSearchCheckMap/style/css.js.map +1 -1
  38. package/lib/VtxSearchCheckMap/style/index.js +2 -18
  39. package/lib/VtxSearchCheckMap/style/index.js.map +1 -1
  40. package/lib/VtxSearchMap/VtxSearchMap.css +44 -60
  41. package/lib/VtxSearchMap/VtxSearchMap.js +59 -68
  42. package/lib/VtxSearchMap/VtxSearchMap.js.map +1 -1
  43. package/lib/VtxSearchMap/VtxSearchMap.less +156 -174
  44. package/lib/VtxSearchMap/index.js.map +1 -1
  45. package/lib/VtxSearchMap/mapping.js.map +1 -1
  46. package/lib/VtxSearchMap/style/css.js +3 -25
  47. package/lib/VtxSearchMap/style/css.js.map +1 -1
  48. package/lib/VtxSearchMap/style/index.js +3 -25
  49. package/lib/VtxSearchMap/style/index.js.map +1 -1
  50. package/lib/default.js +37 -13
  51. package/lib/default.js.map +1 -1
  52. package/lib/utils/util.js +0 -53
  53. package/lib/utils/util.js.map +1 -1
  54. package/package.json +67 -65
  55. package/lib/VtxModal/VtxModalAntd3.css +0 -62
  56. package/lib/VtxModal/VtxModalAntd3.less +0 -67
  57. package/lib/VtxSearchCheckMap/VtxSearchCheckMapAntd3.css +0 -0
  58. package/lib/VtxSearchCheckMap/VtxSearchCheckMapAntd3.less +0 -1
  59. package/lib/VtxSearchMap/VtxSearchMapAntd3.css +0 -0
  60. package/lib/VtxSearchMap/VtxSearchMapAntd3.less +0 -1
@@ -6,16 +6,12 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports["default"] = void 0;
8
8
  var _react = _interopRequireDefault(require("react"));
9
- var _button = _interopRequireDefault(require("antd/lib/button"));
10
- var _input = _interopRequireDefault(require("antd/lib/input"));
11
- var _message = _interopRequireDefault(require("antd/lib/message"));
12
- var _checkbox = _interopRequireDefault(require("antd/lib/checkbox"));
9
+ var _antd = require("antd");
13
10
  var _VtxModal = require("../VtxModal");
14
11
  var _VtxMap = require("../VtxMap");
15
12
  var _default2 = _interopRequireWildcard(require("../default"));
16
13
  var _mapping = require("./mapping");
17
14
  var _util = require("../utils/util");
18
- var _antd = require("antd");
19
15
  var _defaultMarker = _interopRequireDefault(require("../VtxMap/images/defaultMarker.png"));
20
16
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
21
17
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
@@ -84,7 +80,7 @@ var CoverageTypes = [{
84
80
  // duration: 5,
85
81
  // });
86
82
  var warning = function warning() {
87
- _message["default"].warning('位置点查询失败,请缩小比例尺或切换关键字后再重新查询!');
83
+ _antd.message.warning('位置点查询失败,请缩小比例尺或切换关键字后再重新查询!');
88
84
  };
89
85
  function distinct(ary) {
90
86
  if ((ary === null || ary === void 0 ? void 0 : ary.length) < 2) {
@@ -99,9 +95,9 @@ function distinct(ary) {
99
95
  }
100
96
  }
101
97
  var getIcon = function getIcon(type) {
102
- return _default2.antdMajorVersion === '4' ? /*#__PURE__*/_react["default"].createElement(_default2.VtxMapIcon, {
98
+ return /*#__PURE__*/_react["default"].createElement(_default2.VtxMapIcon, {
103
99
  type: "icon-".concat(_mapping.iconMapping[type])
104
- }) : type;
100
+ });
105
101
  };
106
102
  var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
107
103
  function VtxSearchMap(props) {
@@ -426,7 +422,7 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
426
422
  value: function locateByLnglat() {
427
423
  var t = this;
428
424
  if (!t.state.searchValue) {
429
- _message["default"].warn(t.TextEnum.msgConfirmInputLnglatText);
425
+ _antd.message.warn(t.TextEnum.msgConfirmInputLnglatText);
430
426
  return;
431
427
  }
432
428
  var _t$state$searchValue$ = t.state.searchValue.split(','),
@@ -434,7 +430,7 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
434
430
  longitude = _t$state$searchValue$2[0],
435
431
  latitude = _t$state$searchValue$2[1];
436
432
  t.setState({
437
- mapCenter: [Number(longitude), Number(latitude)],
433
+ mapCenter: [longitude, latitude],
438
434
  setCenter: true
439
435
  }, function () {
440
436
  t.setState({
@@ -451,7 +447,7 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
451
447
  value: function searchList() {
452
448
  var t = this;
453
449
  if (!t.state.searchValue) {
454
- _message["default"].warn(this.TextEnum.msgConfirmInputText);
450
+ _antd.message.warn(this.TextEnum.msgConfirmInputText);
455
451
  return;
456
452
  }
457
453
  if (t.state.searchMode === 'lnglat') {
@@ -476,23 +472,15 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
476
472
  } else if (obj.geometry && obj.geometry.rings) {
477
473
  lnglat = getAvg(obj.geometry.rings);
478
474
  }
479
- var olProps = t.props.olProps;
480
- var config = {};
481
- if (olProps !== null && olProps !== void 0 && olProps.epsg) {
482
- config = {
483
- epsg: olProps === null || olProps === void 0 ? void 0 : olProps.epsg,
484
- coordtype: 'cgcs2000'
485
- };
486
- }
487
475
  if (!!lnglat) {
488
476
  $.ajax({
489
477
  url: "".concat(t.prefixUrl, "/cloudLbs/vortexapi/rest/lbs/geoconvert/v2"),
490
478
  method: "GET",
491
- data: _objectSpread({
479
+ data: {
492
480
  location: lnglat,
493
481
  coordtype: _util.MapTypeEnum[t.state.mapType],
494
482
  batch: false
495
- }, config),
483
+ },
496
484
  headers: {
497
485
  'authorization': "Bearer ".concat((0, _util.getToken)())
498
486
  },
@@ -505,7 +493,7 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
505
493
  }
506
494
  },
507
495
  fail: function fail(res) {
508
- _message["default"].warn("");
496
+ _antd.message.warn("");
509
497
  }
510
498
  });
511
499
  }
@@ -531,7 +519,7 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
531
519
  var lnglat = (0, _util.transform)({
532
520
  lng: item.lngDone,
533
521
  lat: item.latDone
534
- }, t.state.mapType, t.state.olProps);
522
+ }, t.state.mapType);
535
523
  return {
536
524
  id: item.id,
537
525
  longitude: lnglat.lng,
@@ -548,7 +536,7 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
548
536
  }
549
537
  },
550
538
  fail: function fail(res) {
551
- _message["default"].warn("");
539
+ _antd.message.warn("");
552
540
  }
553
541
  });
554
542
  }
@@ -708,7 +696,7 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
708
696
  var _this3 = this;
709
697
  var disableEditIds = this.getAllOtherGraphId();
710
698
  if (obj.attributes && disableEditIds.includes(obj.attributes.id)) {
711
- _message["default"].warn(this.TextEnum.msgDoNotAllowOtherGraph);
699
+ _antd.message.warn(this.TextEnum.msgDoNotAllowOtherGraph);
712
700
  } else {
713
701
  if (obj.type === 'point' && obj.attributes.other === 'search') {
714
702
  this.chooseAddress(obj.attributes.id);
@@ -733,7 +721,7 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
733
721
  this.isDrawStatus = false;
734
722
  this.isClickMap = false;
735
723
  if (this.isDrawStatus && this.isClickMap) {
736
- _message["default"].warning(this.TextEnum.msgEndEditingDrawText);
724
+ _antd.message.warning(this.TextEnum.msgEndEditingDrawText);
737
725
  } else {
738
726
  if ('closeModal' in this.props) {
739
727
  this.props.closeModal();
@@ -789,10 +777,10 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
789
777
  value: function editGraphic() {
790
778
  var _this6 = this;
791
779
  if (this.isDrawStatus && this.isClickMap) {
792
- _message["default"].warning(this.TextEnum.msgEndEditingDrawText);
780
+ _antd.message.warning(this.TextEnum.msgEndEditingDrawText);
793
781
  return;
794
782
  }
795
- _message["default"].info(this.TextEnum.msgClickGraphicEditText);
783
+ _antd.message.info(this.TextEnum.msgClickGraphicEditText);
796
784
  this.clickable = true;
797
785
  this.isDrawStatus = false;
798
786
  this.setState({
@@ -1061,12 +1049,16 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
1061
1049
  style: {
1062
1050
  top: 50
1063
1051
  },
1064
- visible: modal1Visible,
1052
+ open: modal1Visible,
1065
1053
  maximize: true,
1066
1054
  isNotMoving: true,
1067
- wrapClassName: styles.searchModal,
1068
- bodyStyle: {
1069
- height: "".concat(window.innerHeight * 0.7, "px")
1055
+ classNames: {
1056
+ wrapper: styles.searchModal
1057
+ },
1058
+ styles: {
1059
+ body: {
1060
+ height: "".concat(window.innerHeight * 0.7, "px")
1061
+ }
1070
1062
  },
1071
1063
  maskClosable: false,
1072
1064
  onModalResize: function onModalResize() {
@@ -1079,7 +1071,7 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
1079
1071
  className: styles.bottom
1080
1072
  }, /*#__PURE__*/_react["default"].createElement("div", {
1081
1073
  className: styles.address
1082
- }, this.state.lbsAddress || ''), /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_button["default"], {
1074
+ }, this.state.lbsAddress || ''), /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_antd.Button, {
1083
1075
  type: "primary",
1084
1076
  onClick: function onClick() {
1085
1077
  if (_this8.multiDraw && _this8.state.isDoEdit && !_this8.state.isEndEdit) {
@@ -1089,7 +1081,7 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
1089
1081
  _this8.callback();
1090
1082
  },
1091
1083
  icon: getIcon('check')
1092
- }, TextEnum.footerConfirmBtnText), /*#__PURE__*/_react["default"].createElement(_button["default"], {
1084
+ }, TextEnum.footerConfirmBtnText), /*#__PURE__*/_react["default"].createElement(_antd.Button, {
1093
1085
  onClick: this.closeModal.bind(this),
1094
1086
  icon: getIcon('close')
1095
1087
  }, TextEnum.footerCancelBtnText)))
@@ -1111,25 +1103,25 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
1111
1103
  value: 'keyword'
1112
1104
  }, this.TextEnum.radioLabelKeywordText), /*#__PURE__*/_react["default"].createElement(_antd.Radio, {
1113
1105
  value: 'lnglat'
1114
- }, this.TextEnum.radioLabelLnglatText)), /*#__PURE__*/_react["default"].createElement(_input["default"], _extends({
1106
+ }, this.TextEnum.radioLabelLnglatText)), /*#__PURE__*/_react["default"].createElement(_antd.Input, _extends({
1115
1107
  key: "1"
1116
- }, InputProps)), this.state.searchMode === 'keyword' ? /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_button["default"], {
1108
+ }, InputProps)), this.state.searchMode === 'keyword' ? /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_antd.Button, {
1117
1109
  key: "2",
1118
1110
  type: "primary",
1119
1111
  onClick: this.searchList.bind(this),
1120
1112
  icon: getIcon('search')
1121
- }, TextEnum.searchConfirmBtnText), /*#__PURE__*/_react["default"].createElement(_button["default"], {
1113
+ }, TextEnum.searchConfirmBtnText), /*#__PURE__*/_react["default"].createElement(_antd.Button, {
1122
1114
  key: "3",
1123
1115
  onClick: this.clearList.bind(this),
1124
1116
  icon: getIcon('close')
1125
- }, TextEnum.searchResetBtnText)) : /*#__PURE__*/_react["default"].createElement(_button["default"], {
1117
+ }, TextEnum.searchResetBtnText)) : /*#__PURE__*/_react["default"].createElement(_antd.Button, {
1126
1118
  key: "4",
1127
1119
  type: "primary",
1128
1120
  onClick: this.locateByLnglat.bind(this)
1129
- }, TextEnum.locateLnglatText)), this.state.graphicType == 'point' ? /*#__PURE__*/_react["default"].createElement(_button["default"], {
1121
+ }, TextEnum.locateLnglatText)), this.state.graphicType == 'point' ? /*#__PURE__*/_react["default"].createElement(_antd.Button, {
1130
1122
  onClick: this.correction.bind(this),
1131
1123
  icon: getIcon('environment')
1132
- }, TextEnum.searchRelocateBtnText) : null, this.state.graphicType != 'point' ? /*#__PURE__*/_react["default"].createElement(_button["default"], {
1124
+ }, TextEnum.searchRelocateBtnText) : null, this.state.graphicType != 'point' ? /*#__PURE__*/_react["default"].createElement(_antd.Button, {
1133
1125
  disabled: this.isDrawStatus,
1134
1126
  onClick: function onClick() {
1135
1127
  _this8.isDrawStatus = true;
@@ -1170,20 +1162,20 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
1170
1162
  _this8.callback('editDraw');
1171
1163
  },
1172
1164
  icon: getIcon('edit')
1173
- }, TextEnum.searchRedrawBtnText) : null, this.multiDraw && /*#__PURE__*/_react["default"].createElement(_button["default"], {
1165
+ }, TextEnum.searchRedrawBtnText) : null, this.multiDraw && /*#__PURE__*/_react["default"].createElement(_antd.Button, {
1174
1166
  onClick: this.continueDraw.bind(this),
1175
1167
  icon: getIcon('edit')
1176
- }, TextEnum.searchContinueDrawBtnText), this.multiDraw && /*#__PURE__*/_react["default"].createElement(_button["default"], {
1168
+ }, TextEnum.searchContinueDrawBtnText), this.multiDraw && /*#__PURE__*/_react["default"].createElement(_antd.Button, {
1177
1169
  onClick: this.editGraphic.bind(this),
1178
1170
  icon: getIcon('edit')
1179
- }, TextEnum.searchEditGraphicBtnText), /*#__PURE__*/_react["default"].createElement(_button["default"], {
1171
+ }, TextEnum.searchEditGraphicBtnText), /*#__PURE__*/_react["default"].createElement(_antd.Button, {
1180
1172
  onClick: this.setFitView.bind(this),
1181
1173
  icon: getIcon('sync')
1182
1174
  }, TextEnum.searchGlobalBtnText), !this.multiDraw && this.map && this.computeGraphic()), /*#__PURE__*/_react["default"].createElement("div", {
1183
1175
  className: styles.top_right
1184
1176
  }, typeof customNodes == 'function' && customNodes(t.map), isShowOther ? /*#__PURE__*/_react["default"].createElement("div", {
1185
1177
  className: styles.otherModal
1186
- }, /*#__PURE__*/_react["default"].createElement(_checkbox["default"], {
1178
+ }, /*#__PURE__*/_react["default"].createElement(_antd.Checkbox, {
1187
1179
  checked: isShowOtherGraph,
1188
1180
  onChange: function onChange(e) {
1189
1181
  _this8.setState({
@@ -1192,7 +1184,7 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
1192
1184
  }
1193
1185
  }, otherText)) : '', isChangeMapType && ['amap', 'bmap', 'tmap'].includes(mapType) && /*#__PURE__*/_react["default"].createElement(_antd.Dropdown, {
1194
1186
  placement: "bottom",
1195
- overlay: /*#__PURE__*/_react["default"].createElement(_antd.Menu, {
1187
+ menu: {
1196
1188
  onClick: function onClick(_ref) {
1197
1189
  var key = _ref.key;
1198
1190
  _this8.setState({
@@ -1200,19 +1192,19 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
1200
1192
  });
1201
1193
  },
1202
1194
  items: [{
1203
- label: TextEnum.labelBaseMapStyleImgText,
1195
+ label: TextEnum.labelBaseMapStyleVecText,
1204
1196
  key: 'sl'
1205
1197
  }, {
1206
- label: TextEnum.labelBaseMapStyleVecText,
1198
+ label: TextEnum.labelBaseMapStyleImgText,
1207
1199
  key: 'wx'
1208
1200
  }]
1209
- })
1201
+ }
1210
1202
  }, /*#__PURE__*/_react["default"].createElement("div", {
1211
1203
  className: styles.mapTxt,
1212
1204
  style: {
1213
1205
  width: 'fit-content'
1214
1206
  }
1215
- }, /*#__PURE__*/_react["default"].createElement(_button["default"], null, coverageType == 'wx' ? TextEnum.labelBaseMapStyleVecText : TextEnum.labelBaseMapStyleImgText, /*#__PURE__*/_react["default"].createElement("img", {
1207
+ }, /*#__PURE__*/_react["default"].createElement(_antd.Button, null, coverageType == 'wx' ? TextEnum.labelBaseMapStyleImgText : TextEnum.labelBaseMapStyleVecText, /*#__PURE__*/_react["default"].createElement("img", {
1216
1208
  src: require("../VtxMap/images/downoutlined.png"),
1217
1209
  width: "20px"
1218
1210
  })))))), /*#__PURE__*/_react["default"].createElement("div", {
@@ -1327,10 +1319,11 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
1327
1319
  }, {
1328
1320
  key: "UNSAFE_componentWillReceiveProps",
1329
1321
  value: function UNSAFE_componentWillReceiveProps(nextProps) {
1322
+ var _this0 = this;
1330
1323
  var t = this;
1331
- t.isClickMap = false;
1332
- if (t.state.graphicType !== nextProps.graphicType && !!t.map) {
1333
- t.map.clearAll();
1324
+ this.isClickMap = false;
1325
+ if (t.state.graphicType !== nextProps.graphicType && !!this.map) {
1326
+ this.map.clearAll();
1334
1327
  t.mapLoaded = false;
1335
1328
  t.isinit = true;
1336
1329
  }
@@ -1338,7 +1331,7 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
1338
1331
  t.mapLoaded = false;
1339
1332
  }
1340
1333
  t.isDrawStatus = nextProps.graphicType !== 'point' && !nextProps.editParam;
1341
- t.setState({
1334
+ this.setState({
1342
1335
  modal1Visible: nextProps.modal1Visible,
1343
1336
  maxZoom: nextProps.maxZoom,
1344
1337
  minZoom: nextProps.minZoom,
@@ -1361,38 +1354,36 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
1361
1354
  setTimeout(function () {
1362
1355
  //实现2+次进入时,清理数据
1363
1356
  if (nextProps.modal1Visible) {
1364
- t.clearList();
1365
- t.setState({
1357
+ _this0.clearList();
1358
+ _this0.setState({
1366
1359
  setZoomLevel: true
1367
1360
  }, function () {
1368
- t.setState({
1361
+ _this0.setState({
1369
1362
  setZoomLevel: false
1370
1363
  });
1371
1364
  });
1372
- if (!!t.map && !!t.state.locationPoint[0] && nextProps.mapCenter && !!nextProps.mapCenter[0]) {
1373
- if (t.map.getGraphic('locationPoint')) {
1365
+ if (!!_this0.map && !!_this0.state.locationPoint[0] && nextProps.mapCenter && !!nextProps.mapCenter[0]) {
1366
+ if (_this0.map.getGraphic('locationPoint')) {
1374
1367
  switch (nextProps.mapType) {
1375
1368
  case 'bmap':
1376
- t.map.getGraphic('locationPoint').mapLayer.setPosition(new BMap.Point(nextProps.mapCenter[0], nextProps.mapCenter[1]));
1369
+ _this0.map.getGraphic('locationPoint').mapLayer.setPosition(new BMap.Point(nextProps.mapCenter[0], nextProps.mapCenter[1]));
1377
1370
  break;
1378
1371
  case 'amap':
1379
- t.map.getGraphic('locationPoint').mapLayer.setPosition(new AMap.LngLat(nextProps.mapCenter[0], nextProps.mapCenter[1]));
1372
+ _this0.map.getGraphic('locationPoint').mapLayer.setPosition(new AMap.LngLat(nextProps.mapCenter[0], nextProps.mapCenter[1]));
1380
1373
  break;
1381
1374
  case 'tmap':
1382
- t.map.getGraphic('locationPoint').mapLayer.setLngLat(new T.LngLat(nextProps.mapCenter[0], nextProps.mapCenter[1]));
1375
+ _this0.map.getGraphic('locationPoint').mapLayer.setLngLat(new T.LngLat(nextProps.mapCenter[0], nextProps.mapCenter[1]));
1383
1376
  break;
1384
1377
  case 'gmap':
1385
- if (t.map.getGraphic('locationPoint').mapLayer.geometry.setLatitude) {
1386
- t.map.getGraphic('locationPoint').mapLayer.geometry.setLatitude(nextProps.mapCenter[1]);
1387
- t.map.getGraphic('locationPoint').mapLayer.geometry.setLongitude(nextProps.mapCenter[0]);
1388
- t.map.state.gis.graphics.refresh();
1389
- }
1378
+ _this0.map.getGraphic('locationPoint').mapLayer.geometry.setLatitude(nextProps.mapCenter[1]);
1379
+ _this0.map.getGraphic('locationPoint').mapLayer.geometry.setLongitude(nextProps.mapCenter[0]);
1380
+ _this0.map.state.gis.graphics.refresh();
1390
1381
  case 'olMap':
1391
- window.ol && t.map.getGraphic('locationPoint').mapLayer.setGeometry(new ol.geom.Point(nextProps.mapCenter));
1382
+ window.ol && _this0.map.getGraphic('locationPoint').mapLayer.setGeometry(new ol.geom.Point(nextProps.mapCenter));
1392
1383
  break;
1393
1384
  }
1394
1385
  }
1395
- t.map.setCenter(nextProps.mapCenter);
1386
+ _this0.map.setCenter(nextProps.mapCenter);
1396
1387
  }
1397
1388
  }
1398
1389
  }, 100);