@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.
- package/README.md +44 -44
- package/lib/VtxMap/AMap/AMap.js +37 -35
- package/lib/VtxMap/AMap/AMap.js.map +1 -1
- package/lib/VtxMap/BMap/Map.js +60 -57
- package/lib/VtxMap/BMap/Map.js.map +1 -1
- package/lib/VtxMap/GMap/Map.js +38 -39
- package/lib/VtxMap/GMap/Map.js.map +1 -1
- package/lib/VtxMap/MapToolFunction.js +0 -9
- package/lib/VtxMap/MapToolFunction.js.map +1 -1
- package/lib/VtxMap/OMap/Map.js +65 -62
- package/lib/VtxMap/OMap/Map.js.map +1 -1
- package/lib/VtxMap/OMap/Map.less +70 -70
- package/lib/VtxMap/OlMap/Map.js +77 -101
- package/lib/VtxMap/OlMap/Map.js.map +1 -1
- package/lib/VtxMap/OlMap/Map.less +230 -230
- package/lib/VtxMap/TMap/TMap.js +58 -56
- package/lib/VtxMap/TMap/TMap.js.map +1 -1
- package/lib/VtxMap/index.js +0 -18
- package/lib/VtxMap/index.js.map +1 -1
- package/lib/VtxMap/optimizingPointMap.js +21 -23
- package/lib/VtxMap/optimizingPointMap.js.map +1 -1
- package/lib/VtxModal/VtxModal.css +76 -18
- package/lib/VtxModal/VtxModal.js +16 -13
- package/lib/VtxModal/VtxModal.js.map +1 -1
- package/lib/VtxModal/VtxModal.less +117 -50
- package/lib/VtxModal/style/css.js +1 -12
- package/lib/VtxModal/style/css.js.map +1 -1
- package/lib/VtxModal/style/index.js +1 -12
- package/lib/VtxModal/style/index.js.map +1 -1
- package/lib/VtxSearchCheckMap/VtxSearchCheckMap.css +45 -63
- package/lib/VtxSearchCheckMap/VtxSearchCheckMap.js +35 -36
- package/lib/VtxSearchCheckMap/VtxSearchCheckMap.js.map +1 -1
- package/lib/VtxSearchCheckMap/VtxSearchCheckMap.less +73 -68
- package/lib/VtxSearchCheckMap/index.js.map +1 -1
- package/lib/VtxSearchCheckMap/mapping.js.map +1 -1
- package/lib/VtxSearchCheckMap/style/css.js +2 -18
- package/lib/VtxSearchCheckMap/style/css.js.map +1 -1
- package/lib/VtxSearchCheckMap/style/index.js +2 -18
- package/lib/VtxSearchCheckMap/style/index.js.map +1 -1
- package/lib/VtxSearchMap/VtxSearchMap.css +44 -60
- package/lib/VtxSearchMap/VtxSearchMap.js +59 -68
- package/lib/VtxSearchMap/VtxSearchMap.js.map +1 -1
- package/lib/VtxSearchMap/VtxSearchMap.less +156 -174
- package/lib/VtxSearchMap/index.js.map +1 -1
- package/lib/VtxSearchMap/mapping.js.map +1 -1
- package/lib/VtxSearchMap/style/css.js +3 -25
- package/lib/VtxSearchMap/style/css.js.map +1 -1
- package/lib/VtxSearchMap/style/index.js +3 -25
- package/lib/VtxSearchMap/style/index.js.map +1 -1
- package/lib/default.js +37 -13
- package/lib/default.js.map +1 -1
- package/lib/utils/util.js +0 -53
- package/lib/utils/util.js.map +1 -1
- package/package.json +67 -65
- package/lib/VtxModal/VtxModalAntd3.css +0 -62
- package/lib/VtxModal/VtxModalAntd3.less +0 -67
- package/lib/VtxSearchCheckMap/VtxSearchCheckMapAntd3.css +0 -0
- package/lib/VtxSearchCheckMap/VtxSearchCheckMapAntd3.less +0 -1
- package/lib/VtxSearchMap/VtxSearchMapAntd3.css +0 -0
- 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
|
|
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
|
-
|
|
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
|
|
98
|
+
return /*#__PURE__*/_react["default"].createElement(_default2.VtxMapIcon, {
|
|
103
99
|
type: "icon-".concat(_mapping.iconMapping[type])
|
|
104
|
-
})
|
|
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
|
-
|
|
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: [
|
|
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
|
-
|
|
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:
|
|
479
|
+
data: {
|
|
492
480
|
location: lnglat,
|
|
493
481
|
coordtype: _util.MapTypeEnum[t.state.mapType],
|
|
494
482
|
batch: false
|
|
495
|
-
},
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
780
|
+
_antd.message.warning(this.TextEnum.msgEndEditingDrawText);
|
|
793
781
|
return;
|
|
794
782
|
}
|
|
795
|
-
|
|
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
|
-
|
|
1052
|
+
open: modal1Visible,
|
|
1065
1053
|
maximize: true,
|
|
1066
1054
|
isNotMoving: true,
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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
|
-
|
|
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.
|
|
1195
|
+
label: TextEnum.labelBaseMapStyleVecText,
|
|
1204
1196
|
key: 'sl'
|
|
1205
1197
|
}, {
|
|
1206
|
-
label: TextEnum.
|
|
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(
|
|
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
|
-
|
|
1332
|
-
if (t.state.graphicType !== nextProps.graphicType && !!
|
|
1333
|
-
|
|
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
|
-
|
|
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
|
-
|
|
1365
|
-
|
|
1357
|
+
_this0.clearList();
|
|
1358
|
+
_this0.setState({
|
|
1366
1359
|
setZoomLevel: true
|
|
1367
1360
|
}, function () {
|
|
1368
|
-
|
|
1361
|
+
_this0.setState({
|
|
1369
1362
|
setZoomLevel: false
|
|
1370
1363
|
});
|
|
1371
1364
|
});
|
|
1372
|
-
if (!!
|
|
1373
|
-
if (
|
|
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
|
-
|
|
1369
|
+
_this0.map.getGraphic('locationPoint').mapLayer.setPosition(new BMap.Point(nextProps.mapCenter[0], nextProps.mapCenter[1]));
|
|
1377
1370
|
break;
|
|
1378
1371
|
case 'amap':
|
|
1379
|
-
|
|
1372
|
+
_this0.map.getGraphic('locationPoint').mapLayer.setPosition(new AMap.LngLat(nextProps.mapCenter[0], nextProps.mapCenter[1]));
|
|
1380
1373
|
break;
|
|
1381
1374
|
case 'tmap':
|
|
1382
|
-
|
|
1375
|
+
_this0.map.getGraphic('locationPoint').mapLayer.setLngLat(new T.LngLat(nextProps.mapCenter[0], nextProps.mapCenter[1]));
|
|
1383
1376
|
break;
|
|
1384
1377
|
case 'gmap':
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
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 &&
|
|
1382
|
+
window.ol && _this0.map.getGraphic('locationPoint').mapLayer.setGeometry(new ol.geom.Point(nextProps.mapCenter));
|
|
1392
1383
|
break;
|
|
1393
1384
|
}
|
|
1394
1385
|
}
|
|
1395
|
-
|
|
1386
|
+
_this0.map.setCenter(nextProps.mapCenter);
|
|
1396
1387
|
}
|
|
1397
1388
|
}
|
|
1398
1389
|
}, 100);
|