@vtx/map 1.2.8 → 1.2.10
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.
|
@@ -267,7 +267,9 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
|
|
|
267
267
|
msgConfirmInputText: '请输入搜索关键字',
|
|
268
268
|
msgEndEditingDrawText: '请双击结束图元编辑',
|
|
269
269
|
msgClickGraphicEditText: '请点击图元进行编辑',
|
|
270
|
-
placeholderSearchInputText: '输入关键字'
|
|
270
|
+
placeholderSearchInputText: '输入关键字',
|
|
271
|
+
lengthText: '长度',
|
|
272
|
+
areaText: '面积'
|
|
271
273
|
}, props.customEnumText || {});
|
|
272
274
|
return _this;
|
|
273
275
|
} // 绘制多个图元时返回参数
|
|
@@ -822,49 +824,114 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
|
|
|
822
824
|
break;
|
|
823
825
|
}
|
|
824
826
|
}
|
|
827
|
+
}, {
|
|
828
|
+
key: "computeGraphic",
|
|
829
|
+
value: function computeGraphic() {
|
|
830
|
+
var _this7 = this;
|
|
831
|
+
|
|
832
|
+
var str = '';
|
|
833
|
+
var _this$state4 = this.state,
|
|
834
|
+
graphicValue = _this$state4.graphicValue,
|
|
835
|
+
editGraphicId = _this$state4.editGraphicId;
|
|
836
|
+
|
|
837
|
+
switch (this.state.graphicType) {
|
|
838
|
+
case 'circle':
|
|
839
|
+
if (this.map.getGraphic(editGraphicId)) {
|
|
840
|
+
var p = this.map.getGraphic(editGraphicId);
|
|
841
|
+
str = "".concat(this.TextEnum.areaText, "\uFF1A").concat(formatNumber(Math.PI * Math.pow(p.geometry.radius, 2)), "\u33A1");
|
|
842
|
+
} else {
|
|
843
|
+
str = "".concat(this.TextEnum.areaText, "\uFF1A").concat(graphicValue ? formatNumber(graphicValue.area) : '-', "\u33A1");
|
|
844
|
+
}
|
|
845
|
+
|
|
846
|
+
break;
|
|
847
|
+
|
|
848
|
+
case 'polygon':
|
|
849
|
+
if (this.map.getGraphic(editGraphicId)) {
|
|
850
|
+
var _p4 = this.map.getGraphic(editGraphicId);
|
|
851
|
+
|
|
852
|
+
str = "".concat(this.TextEnum.areaText, "\uFF1A").concat(formatNumber(this.map.getPolygonArea(distinct(_p4.geometry.rings))), "\u33A1");
|
|
853
|
+
} else {
|
|
854
|
+
str = "".concat(this.TextEnum.areaText, "\uFF1A").concat(graphicValue ? formatNumber(graphicValue.area) : '-', "\u33A1");
|
|
855
|
+
}
|
|
856
|
+
|
|
857
|
+
break;
|
|
858
|
+
|
|
859
|
+
case 'rectangle':
|
|
860
|
+
str = "".concat(this.TextEnum.areaText, "\uFF1A").concat(graphicValue ? formatNumber(graphicValue.area) : '-', "\u33A1");
|
|
861
|
+
break;
|
|
862
|
+
|
|
863
|
+
case 'polyline':
|
|
864
|
+
if (this.map.getGraphic(editGraphicId)) {
|
|
865
|
+
var _p5 = this.map.getGraphic(editGraphicId);
|
|
866
|
+
|
|
867
|
+
str = "".concat(this.TextEnum.lengthText, "\uFF1A").concat(formatNumber(this.map.calculateDistance(_p5.geometry.paths)), "m");
|
|
868
|
+
} else {
|
|
869
|
+
str = "".concat(this.TextEnum.lengthText, "\uFF1A").concat(graphicValue ? formatNumber(this.map.calculateDistance(graphicValue.geometry.paths)) : '-', "m");
|
|
870
|
+
}
|
|
871
|
+
|
|
872
|
+
break;
|
|
873
|
+
}
|
|
874
|
+
|
|
875
|
+
if (str) {
|
|
876
|
+
return /*#__PURE__*/_react["default"].createElement("span", {
|
|
877
|
+
style: {
|
|
878
|
+
display: 'inline-block',
|
|
879
|
+
marginLeft: '10px'
|
|
880
|
+
}
|
|
881
|
+
}, /*#__PURE__*/_react["default"].createElement("span", null, str), /*#__PURE__*/_react["default"].createElement("span", {
|
|
882
|
+
onClick: function onClick() {
|
|
883
|
+
_this7.setState({
|
|
884
|
+
flag: Math.random()
|
|
885
|
+
});
|
|
886
|
+
}
|
|
887
|
+
}, getIcon('sync')));
|
|
888
|
+
} else {
|
|
889
|
+
return null;
|
|
890
|
+
}
|
|
891
|
+
}
|
|
825
892
|
}, {
|
|
826
893
|
key: "render",
|
|
827
894
|
value: function render() {
|
|
828
|
-
var
|
|
895
|
+
var _this8 = this;
|
|
829
896
|
|
|
830
897
|
var t = this;
|
|
831
898
|
var TextEnum = t.TextEnum;
|
|
832
|
-
var _this$
|
|
833
|
-
isShowList = _this$
|
|
834
|
-
searchValue = _this$
|
|
835
|
-
locationPoint = _this$
|
|
836
|
-
listPoint = _this$
|
|
837
|
-
listMess = _this$
|
|
838
|
-
mapZoomLevel = _this$
|
|
839
|
-
setZoomLevel = _this$
|
|
840
|
-
maxZoom = _this$
|
|
841
|
-
minZoom = _this$
|
|
842
|
-
wkid = _this$
|
|
843
|
-
mapServer = _this$
|
|
844
|
-
mapCenter = _this$
|
|
845
|
-
setCenter = _this$
|
|
846
|
-
mapType = _this$
|
|
847
|
-
mapStyle = _this$
|
|
848
|
-
mapVisiblePoints = _this$
|
|
849
|
-
setVisiblePoints = _this$
|
|
850
|
-
isDoEdit = _this$
|
|
851
|
-
editGraphicId = _this$
|
|
852
|
-
isEndEdit = _this$
|
|
853
|
-
modal1Visible = _this$
|
|
854
|
-
drawGraphID = _this$
|
|
855
|
-
isShowOther = _this$
|
|
856
|
-
otherText = _this$
|
|
857
|
-
isShowOtherGraph = _this$
|
|
858
|
-
editGraphic = _this$
|
|
859
|
-
graphicType = _this$
|
|
860
|
-
graphicValue = _this$
|
|
861
|
-
olProps = _this$
|
|
862
|
-
isChangeMapType = _this$
|
|
863
|
-
currentMap = _this$
|
|
864
|
-
showControl = _this$
|
|
865
|
-
coverageType = _this$
|
|
866
|
-
customNodes = _this$
|
|
867
|
-
language = _this$
|
|
899
|
+
var _this$state5 = this.state,
|
|
900
|
+
isShowList = _this$state5.isShowList,
|
|
901
|
+
searchValue = _this$state5.searchValue,
|
|
902
|
+
locationPoint = _this$state5.locationPoint,
|
|
903
|
+
listPoint = _this$state5.listPoint,
|
|
904
|
+
listMess = _this$state5.listMess,
|
|
905
|
+
mapZoomLevel = _this$state5.mapZoomLevel,
|
|
906
|
+
setZoomLevel = _this$state5.setZoomLevel,
|
|
907
|
+
maxZoom = _this$state5.maxZoom,
|
|
908
|
+
minZoom = _this$state5.minZoom,
|
|
909
|
+
wkid = _this$state5.wkid,
|
|
910
|
+
mapServer = _this$state5.mapServer,
|
|
911
|
+
mapCenter = _this$state5.mapCenter,
|
|
912
|
+
setCenter = _this$state5.setCenter,
|
|
913
|
+
mapType = _this$state5.mapType,
|
|
914
|
+
mapStyle = _this$state5.mapStyle,
|
|
915
|
+
mapVisiblePoints = _this$state5.mapVisiblePoints,
|
|
916
|
+
setVisiblePoints = _this$state5.setVisiblePoints,
|
|
917
|
+
isDoEdit = _this$state5.isDoEdit,
|
|
918
|
+
editGraphicId = _this$state5.editGraphicId,
|
|
919
|
+
isEndEdit = _this$state5.isEndEdit,
|
|
920
|
+
modal1Visible = _this$state5.modal1Visible,
|
|
921
|
+
drawGraphID = _this$state5.drawGraphID,
|
|
922
|
+
isShowOther = _this$state5.isShowOther,
|
|
923
|
+
otherText = _this$state5.otherText,
|
|
924
|
+
isShowOtherGraph = _this$state5.isShowOtherGraph,
|
|
925
|
+
editGraphic = _this$state5.editGraphic,
|
|
926
|
+
graphicType = _this$state5.graphicType,
|
|
927
|
+
graphicValue = _this$state5.graphicValue,
|
|
928
|
+
olProps = _this$state5.olProps,
|
|
929
|
+
isChangeMapType = _this$state5.isChangeMapType,
|
|
930
|
+
currentMap = _this$state5.currentMap,
|
|
931
|
+
showControl = _this$state5.showControl,
|
|
932
|
+
coverageType = _this$state5.coverageType,
|
|
933
|
+
customNodes = _this$state5.customNodes,
|
|
934
|
+
language = _this$state5.language;
|
|
868
935
|
var InputProps = {
|
|
869
936
|
style: {
|
|
870
937
|
'width': '200px'
|
|
@@ -882,19 +949,19 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
|
|
|
882
949
|
isDraw: this.state.isDraw,
|
|
883
950
|
isCloseDraw: this.state.isCloseDraw,
|
|
884
951
|
drawEnd: function drawEnd(obj) {
|
|
885
|
-
|
|
886
|
-
|
|
952
|
+
_this8.isDrawStatus = false;
|
|
953
|
+
_this8.isClickMap = false;
|
|
887
954
|
var objparam = {
|
|
888
|
-
graphicValue:
|
|
889
|
-
isDoEdit: !
|
|
890
|
-
isDraw:
|
|
955
|
+
graphicValue: _this8.multiDraw ? [].concat(_toConsumableArray(graphicValue || []), [obj]) : obj,
|
|
956
|
+
isDoEdit: !_this8.multiDraw,
|
|
957
|
+
isDraw: _this8.multiDraw
|
|
891
958
|
};
|
|
892
959
|
|
|
893
|
-
if (!
|
|
960
|
+
if (!_this8.multiDraw && (obj.geometryType == 'polyline' || obj.geometryType == 'polygon')) {
|
|
894
961
|
objparam.editGraphicId = obj.id;
|
|
895
962
|
}
|
|
896
963
|
|
|
897
|
-
|
|
964
|
+
_this8.setState(objparam);
|
|
898
965
|
},
|
|
899
966
|
mapDraw: {
|
|
900
967
|
geometryType: this.state.graphicType,
|
|
@@ -992,8 +1059,8 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
|
|
|
992
1059
|
},
|
|
993
1060
|
maskClosable: false,
|
|
994
1061
|
onModalResize: function onModalResize() {
|
|
995
|
-
if (
|
|
996
|
-
|
|
1062
|
+
if (_this8.state.mapType == 'olmap') {
|
|
1063
|
+
_this8.map.updateSize();
|
|
997
1064
|
}
|
|
998
1065
|
},
|
|
999
1066
|
onCancel: this.closeModal.bind(this),
|
|
@@ -1002,13 +1069,13 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
|
|
|
1002
1069
|
}, /*#__PURE__*/_react["default"].createElement(_button["default"], {
|
|
1003
1070
|
type: "primary",
|
|
1004
1071
|
onClick: function onClick() {
|
|
1005
|
-
if (
|
|
1006
|
-
|
|
1072
|
+
if (_this8.multiDraw && _this8.state.isDoEdit && !_this8.state.isEndEdit) {
|
|
1073
|
+
_this8.continueDraw(_this8.callback.bind(_this8));
|
|
1007
1074
|
|
|
1008
1075
|
return;
|
|
1009
1076
|
}
|
|
1010
1077
|
|
|
1011
|
-
|
|
1078
|
+
_this8.callback();
|
|
1012
1079
|
},
|
|
1013
1080
|
icon: getIcon('check')
|
|
1014
1081
|
}, TextEnum.footerConfirmBtnText), /*#__PURE__*/_react["default"].createElement(_button["default"], {
|
|
@@ -1038,10 +1105,10 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
|
|
|
1038
1105
|
}, TextEnum.searchRelocateBtnText) : null, this.state.graphicType != 'point' ? /*#__PURE__*/_react["default"].createElement(_button["default"], {
|
|
1039
1106
|
disabled: this.isDrawStatus,
|
|
1040
1107
|
onClick: function onClick() {
|
|
1041
|
-
|
|
1108
|
+
_this8.isDrawStatus = true;
|
|
1042
1109
|
|
|
1043
|
-
if (
|
|
1044
|
-
|
|
1110
|
+
if (_this8.multiDraw) {
|
|
1111
|
+
_this8.clickable = false;
|
|
1045
1112
|
graphicValue === null || graphicValue === void 0 ? void 0 : graphicValue.forEach(function (item) {
|
|
1046
1113
|
return t.map.removeGraphic(item.id, 'draw');
|
|
1047
1114
|
});
|
|
@@ -1049,21 +1116,21 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
|
|
|
1049
1116
|
return t.map.removeGraphic(item.id, 'draw');
|
|
1050
1117
|
});
|
|
1051
1118
|
|
|
1052
|
-
|
|
1119
|
+
_this8.setState({
|
|
1053
1120
|
isDraw: false,
|
|
1054
1121
|
isCloseDraw: true,
|
|
1055
1122
|
isEndEdit: false,
|
|
1056
1123
|
graphicValue: null,
|
|
1057
1124
|
editGraphic: null
|
|
1058
1125
|
}, function () {
|
|
1059
|
-
|
|
1126
|
+
_this8.setState({
|
|
1060
1127
|
isDraw: true,
|
|
1061
1128
|
isCloseDraw: false,
|
|
1062
1129
|
isEndEdit: true
|
|
1063
1130
|
});
|
|
1064
1131
|
});
|
|
1065
1132
|
} else {
|
|
1066
|
-
|
|
1133
|
+
_this8.setState({
|
|
1067
1134
|
isDraw: true,
|
|
1068
1135
|
graphicValue: null,
|
|
1069
1136
|
editGraphic: null,
|
|
@@ -1076,7 +1143,7 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
|
|
|
1076
1143
|
});
|
|
1077
1144
|
}
|
|
1078
1145
|
|
|
1079
|
-
|
|
1146
|
+
_this8.callback('editDraw');
|
|
1080
1147
|
},
|
|
1081
1148
|
icon: getIcon('edit')
|
|
1082
1149
|
}, TextEnum.searchRedrawBtnText) : null, this.multiDraw && /*#__PURE__*/_react["default"].createElement(_button["default"], {
|
|
@@ -1088,14 +1155,14 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
|
|
|
1088
1155
|
}, TextEnum.searchEditGraphicBtnText), /*#__PURE__*/_react["default"].createElement(_button["default"], {
|
|
1089
1156
|
onClick: this.setFitView.bind(this),
|
|
1090
1157
|
icon: getIcon('sync')
|
|
1091
|
-
}, TextEnum.searchGlobalBtnText)), /*#__PURE__*/_react["default"].createElement("div", {
|
|
1158
|
+
}, TextEnum.searchGlobalBtnText), !this.multiDraw && this.map && this.computeGraphic()), /*#__PURE__*/_react["default"].createElement("div", {
|
|
1092
1159
|
className: styles.top_right
|
|
1093
1160
|
}, typeof customNodes == 'function' && customNodes(t.map), isShowOther ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
1094
1161
|
className: styles.otherModal
|
|
1095
1162
|
}, /*#__PURE__*/_react["default"].createElement(_checkbox["default"], {
|
|
1096
1163
|
checked: isShowOtherGraph,
|
|
1097
1164
|
onChange: function onChange(e) {
|
|
1098
|
-
|
|
1165
|
+
_this8.setState({
|
|
1099
1166
|
isShowOtherGraph: e.target.checked
|
|
1100
1167
|
});
|
|
1101
1168
|
}
|
|
@@ -1106,7 +1173,7 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
|
|
|
1106
1173
|
var key = _ref.key;
|
|
1107
1174
|
console.log(key);
|
|
1108
1175
|
|
|
1109
|
-
|
|
1176
|
+
_this8.setState({
|
|
1110
1177
|
coverageType: key
|
|
1111
1178
|
});
|
|
1112
1179
|
},
|
|
@@ -1141,7 +1208,7 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
|
|
|
1141
1208
|
className: styles.title
|
|
1142
1209
|
}, TextEnum.labelSearchResultText), /*#__PURE__*/_react["default"].createElement("div", {
|
|
1143
1210
|
onClick: function onClick() {
|
|
1144
|
-
return
|
|
1211
|
+
return _this8.showOrhidden(false);
|
|
1145
1212
|
},
|
|
1146
1213
|
className: styles.btn
|
|
1147
1214
|
}, /*#__PURE__*/_react["default"].createElement(_default2.VtxMapIcon, {
|
|
@@ -1152,13 +1219,13 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
|
|
|
1152
1219
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
1153
1220
|
key: index,
|
|
1154
1221
|
onClick: function onClick() {
|
|
1155
|
-
return
|
|
1222
|
+
return _this8.chooseAddress(item.id);
|
|
1156
1223
|
},
|
|
1157
1224
|
className: "".concat(styles.lists, " ").concat(item.isSelect ? styles.select : '')
|
|
1158
1225
|
}, item.title);
|
|
1159
1226
|
}))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
1160
1227
|
onClick: function onClick() {
|
|
1161
|
-
return
|
|
1228
|
+
return _this8.showOrhidden(true);
|
|
1162
1229
|
},
|
|
1163
1230
|
className: "".concat(styles.btn, " ").concat(!isShowList ? styles.show : styles.hidden)
|
|
1164
1231
|
}, /*#__PURE__*/_react["default"].createElement(_default2.VtxMapIcon, {
|
|
@@ -1167,7 +1234,7 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
|
|
|
1167
1234
|
className: styles.content_right
|
|
1168
1235
|
}, /*#__PURE__*/_react["default"].createElement(_VtxMap.VtxMap, _extends({
|
|
1169
1236
|
getMapInstance: function getMapInstance(map) {
|
|
1170
|
-
if (map)
|
|
1237
|
+
if (map) _this8.map = map;
|
|
1171
1238
|
},
|
|
1172
1239
|
mapType: mapType,
|
|
1173
1240
|
mapStyle: mapStyle,
|
|
@@ -1203,25 +1270,25 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
|
|
|
1203
1270
|
}, {
|
|
1204
1271
|
key: "initSearchMap",
|
|
1205
1272
|
value: function initSearchMap() {
|
|
1206
|
-
var
|
|
1273
|
+
var _this9 = this;
|
|
1207
1274
|
|
|
1208
1275
|
if (this.props.modal1Visible
|
|
1209
1276
|
/*&& !this.state.locationPoint[0]*/
|
|
1210
1277
|
) {
|
|
1211
1278
|
if (this.map) {
|
|
1212
1279
|
this.map.loadMapComplete.then(function () {
|
|
1213
|
-
if (!
|
|
1214
|
-
var
|
|
1280
|
+
if (!_this9.mapLoaded) {
|
|
1281
|
+
var _this9$props$editPara, _this9$props$editPara2;
|
|
1215
1282
|
|
|
1216
|
-
|
|
1283
|
+
_this9.mapLoaded = true;
|
|
1217
1284
|
|
|
1218
|
-
|
|
1285
|
+
_this9.drawLocationPoint();
|
|
1219
1286
|
|
|
1220
|
-
if ((
|
|
1287
|
+
if ((_this9$props$editPara = _this9.props.editParam) !== null && _this9$props$editPara !== void 0 && _this9$props$editPara.rings || (_this9$props$editPara2 = _this9.props.editParam) !== null && _this9$props$editPara2 !== void 0 && _this9$props$editPara2.paths) {
|
|
1221
1288
|
var timer = setTimeout(function () {
|
|
1222
|
-
var
|
|
1289
|
+
var _this9$props$editPara3, _this9$props$editPara4;
|
|
1223
1290
|
|
|
1224
|
-
|
|
1291
|
+
_this9.map.fitView(((_this9$props$editPara3 = _this9.props.editParam) === null || _this9$props$editPara3 === void 0 ? void 0 : _this9$props$editPara3.rings) || ((_this9$props$editPara4 = _this9.props.editParam) === null || _this9$props$editPara4 === void 0 ? void 0 : _this9$props$editPara4.paths) || []);
|
|
1225
1292
|
|
|
1226
1293
|
clearTimeout(timer);
|
|
1227
1294
|
}, 100);
|
|
@@ -1246,7 +1313,7 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
|
|
|
1246
1313
|
}, {
|
|
1247
1314
|
key: "UNSAFE_componentWillReceiveProps",
|
|
1248
1315
|
value: function UNSAFE_componentWillReceiveProps(nextProps) {
|
|
1249
|
-
var
|
|
1316
|
+
var _this10 = this;
|
|
1250
1317
|
|
|
1251
1318
|
var t = this;
|
|
1252
1319
|
this.isClickMap = false;
|
|
@@ -1284,49 +1351,49 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
|
|
|
1284
1351
|
setTimeout(function () {
|
|
1285
1352
|
//实现2+次进入时,清理数据
|
|
1286
1353
|
if (nextProps.modal1Visible) {
|
|
1287
|
-
|
|
1354
|
+
_this10.clearList();
|
|
1288
1355
|
|
|
1289
|
-
|
|
1356
|
+
_this10.setState({
|
|
1290
1357
|
setZoomLevel: true
|
|
1291
1358
|
}, function () {
|
|
1292
|
-
|
|
1359
|
+
_this10.setState({
|
|
1293
1360
|
setZoomLevel: false
|
|
1294
1361
|
});
|
|
1295
1362
|
});
|
|
1296
1363
|
|
|
1297
|
-
if (!!
|
|
1298
|
-
if (
|
|
1364
|
+
if (!!_this10.map && !!_this10.state.locationPoint[0] && nextProps.mapCenter && !!nextProps.mapCenter[0]) {
|
|
1365
|
+
if (_this10.map.getGraphic('locationPoint')) {
|
|
1299
1366
|
switch (nextProps.mapType) {
|
|
1300
1367
|
case 'bmap':
|
|
1301
|
-
|
|
1368
|
+
_this10.map.getGraphic('locationPoint').mapLayer.setPosition(new BMap.Point(nextProps.mapCenter[0], nextProps.mapCenter[1]));
|
|
1302
1369
|
|
|
1303
1370
|
break;
|
|
1304
1371
|
|
|
1305
1372
|
case 'amap':
|
|
1306
|
-
|
|
1373
|
+
_this10.map.getGraphic('locationPoint').mapLayer.setPosition(new AMap.LngLat(nextProps.mapCenter[0], nextProps.mapCenter[1]));
|
|
1307
1374
|
|
|
1308
1375
|
break;
|
|
1309
1376
|
|
|
1310
1377
|
case 'tmap':
|
|
1311
|
-
|
|
1378
|
+
_this10.map.getGraphic('locationPoint').mapLayer.setLngLat(new T.LngLat(nextProps.mapCenter[0], nextProps.mapCenter[1]));
|
|
1312
1379
|
|
|
1313
1380
|
break;
|
|
1314
1381
|
|
|
1315
1382
|
case 'gmap':
|
|
1316
|
-
|
|
1383
|
+
_this10.map.getGraphic('locationPoint').mapLayer.geometry.setLatitude(nextProps.mapCenter[1]);
|
|
1317
1384
|
|
|
1318
|
-
|
|
1385
|
+
_this10.map.getGraphic('locationPoint').mapLayer.geometry.setLongitude(nextProps.mapCenter[0]);
|
|
1319
1386
|
|
|
1320
|
-
|
|
1387
|
+
_this10.map.state.gis.graphics.refresh();
|
|
1321
1388
|
|
|
1322
1389
|
case 'olMap':
|
|
1323
|
-
|
|
1390
|
+
_this10.map.getGraphic('locationPoint').mapLayer.setGeometry(new ol.geom.Point(nextProps.mapCenter));
|
|
1324
1391
|
|
|
1325
1392
|
break;
|
|
1326
1393
|
}
|
|
1327
1394
|
}
|
|
1328
1395
|
|
|
1329
|
-
|
|
1396
|
+
_this10.map.setCenter(nextProps.mapCenter);
|
|
1330
1397
|
}
|
|
1331
1398
|
}
|
|
1332
1399
|
}, 100);
|
|
@@ -1348,5 +1415,10 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
|
|
|
1348
1415
|
|
|
1349
1416
|
var _default = VtxSearchMap;
|
|
1350
1417
|
exports["default"] = _default;
|
|
1418
|
+
|
|
1419
|
+
function formatNumber(num) {
|
|
1420
|
+
return Number(num).toFixed(2);
|
|
1421
|
+
}
|
|
1422
|
+
|
|
1351
1423
|
module.exports = exports["default"];
|
|
1352
1424
|
//# sourceMappingURL=VtxSearchMap.js.map
|