@vtx/map 1.2.30 → 6.0.0-beta.1
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 +359 -355
- package/lib/VtxMap/BMap/Map.js +331 -330
- package/lib/VtxMap/BMap/Map1.js +1712 -0
- package/lib/VtxMap/GMap/Map.js +432 -427
- package/lib/VtxMap/Map.js +31 -27
- package/lib/VtxMap/MapToolFunction.js +6 -7
- package/lib/VtxMap/OMap/Map.js +410 -405
- package/lib/VtxMap/OMap/Map.less +70 -70
- package/lib/VtxMap/OlMap/Map.js +450 -440
- package/lib/VtxMap/OlMap/Map.less +230 -230
- package/lib/VtxMap/TMap/TMap.js +321 -318
- package/lib/VtxMap/index.js +10 -11
- package/lib/VtxMap/mapPlayer.js +15 -16
- package/lib/VtxMap/optimizingPointMap.js +35 -33
- package/lib/VtxMap/style/index.js +1 -2
- package/lib/VtxMap/zoomMap.js +24 -23
- package/lib/VtxModal/VtxModal.js +94 -82
- package/lib/VtxModal/VtxModal.less +83 -52
- package/lib/VtxModal/draggableModal.js +35 -33
- package/lib/VtxModal/index.js +6 -7
- package/lib/VtxModal/style/index.js +1 -15
- package/lib/VtxSearchCheckMap/VtxSearchCheckMap.js +265 -244
- package/lib/VtxSearchCheckMap/VtxSearchCheckMap.less +69 -43
- package/lib/VtxSearchCheckMap/index.js +4 -9
- package/lib/VtxSearchCheckMap/mapping.js +1 -2
- package/lib/VtxSearchCheckMap/style/index.js +5 -11
- package/lib/VtxSearchMap/VtxSearchMap.js +326 -288
- package/lib/VtxSearchMap/VtxSearchMap.less +74 -47
- package/lib/VtxSearchMap/VtxSearchMapAntd3.less +1 -1
- package/lib/VtxSearchMap/index.js +4 -9
- package/lib/VtxSearchMap/mapping.js +1 -2
- package/lib/VtxSearchMap/style/index.js +1 -28
- package/lib/default.js +44 -24
- package/lib/index.js +30 -31
- package/lib/utils/util.js +3 -4
- package/package.json +19 -27
- package/lib/VtxMap/AMap/AMap.css +0 -27
- package/lib/VtxMap/AMap/AMap.js.map +0 -1
- package/lib/VtxMap/BMap/Map.css +0 -26
- package/lib/VtxMap/BMap/Map.js.map +0 -1
- package/lib/VtxMap/GMap/Map.css +0 -88
- package/lib/VtxMap/GMap/Map.js.map +0 -1
- package/lib/VtxMap/Map.css +0 -7
- package/lib/VtxMap/Map.js.map +0 -1
- package/lib/VtxMap/MapToolFunction.js.map +0 -1
- package/lib/VtxMap/OMap/Map.css +0 -76
- package/lib/VtxMap/OMap/Map.js.map +0 -1
- package/lib/VtxMap/OlMap/Map.css +0 -229
- package/lib/VtxMap/OlMap/Map.js.map +0 -1
- package/lib/VtxMap/TMap/TMap.css +0 -31
- package/lib/VtxMap/TMap/TMap.js.map +0 -1
- package/lib/VtxMap/index.js.map +0 -1
- package/lib/VtxMap/mapPlayer.js.map +0 -1
- package/lib/VtxMap/optimizingPointMap.js.map +0 -1
- package/lib/VtxMap/style/css.js +0 -10
- package/lib/VtxMap/style/css.js.map +0 -1
- package/lib/VtxMap/style/index.js.map +0 -1
- package/lib/VtxMap/zoomMap.js.map +0 -1
- package/lib/VtxModal/VtxModal.css +0 -62
- package/lib/VtxModal/VtxModal.js.map +0 -1
- package/lib/VtxModal/VtxModalAntd3.css +0 -62
- package/lib/VtxModal/VtxModalAntd3.less +0 -67
- package/lib/VtxModal/draggableModal.js.map +0 -1
- package/lib/VtxModal/index.js.map +0 -1
- package/lib/VtxModal/style/css.js +0 -15
- package/lib/VtxModal/style/css.js.map +0 -1
- package/lib/VtxModal/style/index.js.map +0 -1
- package/lib/VtxSearchCheckMap/VtxSearchCheckMap.css +0 -182
- package/lib/VtxSearchCheckMap/VtxSearchCheckMap.js.map +0 -1
- package/lib/VtxSearchCheckMap/VtxSearchCheckMapAntd3.css +0 -0
- package/lib/VtxSearchCheckMap/VtxSearchCheckMapAntd3.less +0 -1
- package/lib/VtxSearchCheckMap/index.js.map +0 -1
- package/lib/VtxSearchCheckMap/mapping.js.map +0 -1
- package/lib/VtxSearchCheckMap/style/css.js +0 -28
- package/lib/VtxSearchCheckMap/style/css.js.map +0 -1
- package/lib/VtxSearchCheckMap/style/index.js.map +0 -1
- package/lib/VtxSearchMap/VtxSearchMap.css +0 -202
- package/lib/VtxSearchMap/VtxSearchMap.js.map +0 -1
- package/lib/VtxSearchMap/VtxSearchMapAntd3.css +0 -0
- package/lib/VtxSearchMap/index.js.map +0 -1
- package/lib/VtxSearchMap/mapping.js.map +0 -1
- package/lib/VtxSearchMap/style/css.js +0 -28
- package/lib/VtxSearchMap/style/css.js.map +0 -1
- package/lib/VtxSearchMap/style/index.js.map +0 -1
- package/lib/default.js.map +0 -1
- package/lib/index.js.map +0 -1
- package/lib/utils/util.js.map +0 -1
|
@@ -4,47 +4,45 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports
|
|
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
|
-
|
|
21
|
-
|
|
22
|
-
function
|
|
23
|
-
function
|
|
16
|
+
require("./VtxSearchMap.less");
|
|
17
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
18
|
+
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); }
|
|
19
|
+
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; }
|
|
20
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
24
22
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
25
|
-
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t
|
|
26
|
-
function _arrayWithHoles(
|
|
23
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
24
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
27
25
|
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; }
|
|
28
26
|
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; }
|
|
29
|
-
function _classCallCheck(
|
|
30
|
-
function _defineProperties(
|
|
31
|
-
function _createClass(
|
|
32
|
-
function
|
|
33
|
-
function
|
|
34
|
-
function
|
|
35
|
-
function
|
|
36
|
-
function
|
|
37
|
-
function
|
|
38
|
-
function
|
|
39
|
-
function _defineProperty(
|
|
40
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i
|
|
27
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
28
|
+
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); } }
|
|
29
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
30
|
+
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); }
|
|
31
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
32
|
+
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); }; }
|
|
33
|
+
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); }
|
|
34
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
35
|
+
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; } }
|
|
36
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
37
|
+
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; }
|
|
38
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
41
39
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
42
|
-
function _toConsumableArray(
|
|
40
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
43
41
|
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."); }
|
|
44
|
-
function _unsupportedIterableToArray(
|
|
45
|
-
function _iterableToArray(
|
|
46
|
-
function _arrayWithoutHoles(
|
|
47
|
-
function _arrayLikeToArray(
|
|
42
|
+
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); }
|
|
43
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
44
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
45
|
+
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; } //公共地址配置
|
|
48
46
|
var styles = {
|
|
49
47
|
searchModal: 'vtx-ui-searchmap-searchmodal',
|
|
50
48
|
searchMap: 'vtx-ui-searchmap-searchmap',
|
|
@@ -84,7 +82,7 @@ var CoverageTypes = [{
|
|
|
84
82
|
// duration: 5,
|
|
85
83
|
// });
|
|
86
84
|
var warning = function warning() {
|
|
87
|
-
|
|
85
|
+
_antd.message.warning('位置点查询失败,请缩小比例尺或切换关键字后再重新查询!');
|
|
88
86
|
};
|
|
89
87
|
function distinct(ary) {
|
|
90
88
|
if ((ary === null || ary === void 0 ? void 0 : ary.length) < 2) {
|
|
@@ -99,17 +97,19 @@ function distinct(ary) {
|
|
|
99
97
|
}
|
|
100
98
|
}
|
|
101
99
|
var getIcon = function getIcon(type) {
|
|
102
|
-
return
|
|
100
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_default2.VtxMapIcon, {
|
|
103
101
|
type: "icon-".concat(_mapping.iconMapping[type])
|
|
104
|
-
})
|
|
102
|
+
});
|
|
105
103
|
};
|
|
106
104
|
var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
|
|
105
|
+
_inherits(VtxSearchMap, _React$Component);
|
|
106
|
+
var _super = _createSuper(VtxSearchMap);
|
|
107
107
|
function VtxSearchMap(props) {
|
|
108
108
|
var _this;
|
|
109
109
|
_classCallCheck(this, VtxSearchMap);
|
|
110
|
-
_this =
|
|
110
|
+
_this = _super.call(this, props);
|
|
111
111
|
// 绘制多个图元时返回参数
|
|
112
|
-
_defineProperty(_this, "getMultiRes", function (graphicType) {
|
|
112
|
+
_defineProperty(_assertThisInitialized(_this), "getMultiRes", function (graphicType) {
|
|
113
113
|
var resData = [];
|
|
114
114
|
var _this$state = _this.state,
|
|
115
115
|
graphicValue = _this$state.graphicValue,
|
|
@@ -237,8 +237,7 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
|
|
|
237
237
|
}, props.customEnumText || {});
|
|
238
238
|
return _this;
|
|
239
239
|
}
|
|
240
|
-
|
|
241
|
-
return _createClass(VtxSearchMap, [{
|
|
240
|
+
_createClass(VtxSearchMap, [{
|
|
242
241
|
key: "callback",
|
|
243
242
|
value:
|
|
244
243
|
//经纬度回调
|
|
@@ -373,7 +372,7 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
|
|
|
373
372
|
longitude: (t.props.mapCenter || [])[0] || lglt.nowCenter.lng,
|
|
374
373
|
latitude: (t.props.mapCenter || [])[1] || lglt.nowCenter.lat,
|
|
375
374
|
// url: `${configUrl.mapServerURL}/images/defaultMarker.png`,
|
|
376
|
-
url: _defaultMarker
|
|
375
|
+
url: _defaultMarker.default,
|
|
377
376
|
config: {
|
|
378
377
|
zIndex: 1000
|
|
379
378
|
}
|
|
@@ -426,7 +425,7 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
|
|
|
426
425
|
value: function locateByLnglat() {
|
|
427
426
|
var t = this;
|
|
428
427
|
if (!t.state.searchValue) {
|
|
429
|
-
|
|
428
|
+
_antd.message.warn(t.TextEnum.msgConfirmInputLnglatText);
|
|
430
429
|
return;
|
|
431
430
|
}
|
|
432
431
|
var _t$state$searchValue$ = t.state.searchValue.split(','),
|
|
@@ -451,7 +450,7 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
|
|
|
451
450
|
value: function searchList() {
|
|
452
451
|
var t = this;
|
|
453
452
|
if (!t.state.searchValue) {
|
|
454
|
-
|
|
453
|
+
_antd.message.warn(this.TextEnum.msgConfirmInputText);
|
|
455
454
|
return;
|
|
456
455
|
}
|
|
457
456
|
if (t.state.searchMode === 'lnglat') {
|
|
@@ -497,7 +496,7 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
|
|
|
497
496
|
}
|
|
498
497
|
},
|
|
499
498
|
fail: function fail(res) {
|
|
500
|
-
|
|
499
|
+
_antd.message.warn("");
|
|
501
500
|
}
|
|
502
501
|
});
|
|
503
502
|
}
|
|
@@ -540,7 +539,7 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
|
|
|
540
539
|
}
|
|
541
540
|
},
|
|
542
541
|
fail: function fail(res) {
|
|
543
|
-
|
|
542
|
+
_antd.message.warn("");
|
|
544
543
|
}
|
|
545
544
|
});
|
|
546
545
|
}
|
|
@@ -646,7 +645,7 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
|
|
|
646
645
|
if (item.id === id) {
|
|
647
646
|
mapCenter = [item.longitude, item.latitude];
|
|
648
647
|
return _objectSpread(_objectSpread({}, item), {}, {
|
|
649
|
-
url: _defaultMarker
|
|
648
|
+
url: _defaultMarker.default,
|
|
650
649
|
labelClass: styles.showLabel
|
|
651
650
|
});
|
|
652
651
|
} else {
|
|
@@ -700,7 +699,7 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
|
|
|
700
699
|
var _this3 = this;
|
|
701
700
|
var disableEditIds = this.getAllOtherGraphId();
|
|
702
701
|
if (obj.attributes && disableEditIds.includes(obj.attributes.id)) {
|
|
703
|
-
|
|
702
|
+
_antd.message.warn(this.TextEnum.msgDoNotAllowOtherGraph);
|
|
704
703
|
} else {
|
|
705
704
|
if (obj.type === 'point' && obj.attributes.other === 'search') {
|
|
706
705
|
this.chooseAddress(obj.attributes.id);
|
|
@@ -725,7 +724,7 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
|
|
|
725
724
|
this.isDrawStatus = false;
|
|
726
725
|
this.isClickMap = false;
|
|
727
726
|
if (this.isDrawStatus && this.isClickMap) {
|
|
728
|
-
|
|
727
|
+
_antd.message.warning(this.TextEnum.msgEndEditingDrawText);
|
|
729
728
|
} else {
|
|
730
729
|
if ('closeModal' in this.props) {
|
|
731
730
|
this.props.closeModal();
|
|
@@ -781,10 +780,10 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
|
|
|
781
780
|
value: function editGraphic() {
|
|
782
781
|
var _this6 = this;
|
|
783
782
|
if (this.isDrawStatus && this.isClickMap) {
|
|
784
|
-
|
|
783
|
+
_antd.message.warning(this.TextEnum.msgEndEditingDrawText);
|
|
785
784
|
return;
|
|
786
785
|
}
|
|
787
|
-
|
|
786
|
+
_antd.message.info(this.TextEnum.msgClickGraphicEditText);
|
|
788
787
|
this.clickable = true;
|
|
789
788
|
this.isDrawStatus = false;
|
|
790
789
|
this.setState({
|
|
@@ -888,18 +887,22 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
|
|
|
888
887
|
break;
|
|
889
888
|
}
|
|
890
889
|
if (str) {
|
|
891
|
-
return /*#__PURE__*/
|
|
890
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
|
|
892
891
|
style: {
|
|
893
892
|
display: 'inline-block',
|
|
894
893
|
marginLeft: '10px'
|
|
895
|
-
}
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
894
|
+
},
|
|
895
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
896
|
+
children: str
|
|
897
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
898
|
+
onClick: function onClick() {
|
|
899
|
+
_this7.setState({
|
|
900
|
+
flag: Math.random()
|
|
901
|
+
});
|
|
902
|
+
},
|
|
903
|
+
children: getIcon('sync')
|
|
904
|
+
})]
|
|
905
|
+
});
|
|
903
906
|
} else {
|
|
904
907
|
return null;
|
|
905
908
|
}
|
|
@@ -1048,12 +1051,12 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
|
|
|
1048
1051
|
mapCircles = [].concat(_toConsumableArray(mapCircles), _toConsumableArray(otherGraph.circle || []));
|
|
1049
1052
|
}
|
|
1050
1053
|
}
|
|
1051
|
-
return /*#__PURE__*/
|
|
1054
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_VtxModal.VtxModal, {
|
|
1052
1055
|
title: this.state.graphicType == 'point' ? TextEnum.locationTitleText : TextEnum.drawTitleText,
|
|
1053
1056
|
style: {
|
|
1054
1057
|
top: 50
|
|
1055
1058
|
},
|
|
1056
|
-
|
|
1059
|
+
open: modal1Visible,
|
|
1057
1060
|
maximize: true,
|
|
1058
1061
|
isNotMoving: true,
|
|
1059
1062
|
wrapClassName: styles.searchModal,
|
|
@@ -1067,219 +1070,255 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
|
|
|
1067
1070
|
}
|
|
1068
1071
|
},
|
|
1069
1072
|
onCancel: this.closeModal.bind(this),
|
|
1070
|
-
footer: /*#__PURE__*/
|
|
1071
|
-
className: styles.bottom
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1073
|
+
footer: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
1074
|
+
className: styles.bottom,
|
|
1075
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
1076
|
+
className: styles.address,
|
|
1077
|
+
children: this.state.lbsAddress || ''
|
|
1078
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
1079
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Button, {
|
|
1080
|
+
type: "primary",
|
|
1081
|
+
onClick: function onClick() {
|
|
1082
|
+
if (_this8.multiDraw && _this8.state.isDoEdit && !_this8.state.isEndEdit) {
|
|
1083
|
+
_this8.continueDraw(_this8.callback.bind(_this8));
|
|
1084
|
+
return;
|
|
1085
|
+
}
|
|
1086
|
+
_this8.callback();
|
|
1087
|
+
},
|
|
1088
|
+
icon: getIcon('check'),
|
|
1089
|
+
children: TextEnum.footerConfirmBtnText
|
|
1090
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Button, {
|
|
1091
|
+
onClick: this.closeModal.bind(this),
|
|
1092
|
+
icon: getIcon('close'),
|
|
1093
|
+
children: TextEnum.footerCancelBtnText
|
|
1094
|
+
})]
|
|
1095
|
+
})]
|
|
1096
|
+
}),
|
|
1097
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
1098
|
+
className: styles.searchMap,
|
|
1099
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
1100
|
+
className: styles.top,
|
|
1101
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
1102
|
+
className: styles.top_left,
|
|
1103
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
1104
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_antd.Radio.Group, {
|
|
1105
|
+
value: this.state.searchMode,
|
|
1106
|
+
onChange: function onChange(e) {
|
|
1107
|
+
_this8.setState({
|
|
1108
|
+
searchMode: e.target.value,
|
|
1109
|
+
searchValue: ''
|
|
1110
|
+
});
|
|
1111
|
+
},
|
|
1112
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Radio, {
|
|
1113
|
+
value: 'keyword',
|
|
1114
|
+
children: this.TextEnum.radioLabelKeywordText
|
|
1115
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Radio, {
|
|
1116
|
+
value: 'lnglat',
|
|
1117
|
+
children: this.TextEnum.radioLabelLnglatText
|
|
1118
|
+
})]
|
|
1119
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Input, _objectSpread({}, InputProps), '1'), this.state.searchMode === 'keyword' ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
1120
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Button, {
|
|
1121
|
+
type: "primary",
|
|
1122
|
+
onClick: this.searchList.bind(this),
|
|
1123
|
+
icon: getIcon('search'),
|
|
1124
|
+
children: TextEnum.searchConfirmBtnText
|
|
1125
|
+
}, '2'), /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Button, {
|
|
1126
|
+
onClick: this.clearList.bind(this),
|
|
1127
|
+
icon: getIcon('close'),
|
|
1128
|
+
children: TextEnum.searchResetBtnText
|
|
1129
|
+
}, '3')]
|
|
1130
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Button, {
|
|
1131
|
+
type: "primary",
|
|
1132
|
+
onClick: this.locateByLnglat.bind(this),
|
|
1133
|
+
children: TextEnum.locateLnglatText
|
|
1134
|
+
}, '4')]
|
|
1135
|
+
}), this.state.graphicType == 'point' ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Button, {
|
|
1136
|
+
onClick: this.correction.bind(this),
|
|
1137
|
+
icon: getIcon('environment'),
|
|
1138
|
+
children: TextEnum.searchRelocateBtnText
|
|
1139
|
+
}) : null, this.state.graphicType != 'point' ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Button, {
|
|
1140
|
+
disabled: this.isDrawStatus,
|
|
1141
|
+
onClick: function onClick() {
|
|
1142
|
+
_this8.isDrawStatus = true;
|
|
1143
|
+
if (_this8.multiDraw) {
|
|
1144
|
+
_this8.clickable = false;
|
|
1145
|
+
graphicValue === null || graphicValue === void 0 || graphicValue.forEach(function (item) {
|
|
1146
|
+
return t.map.removeGraphic(item.id, 'draw');
|
|
1147
|
+
});
|
|
1148
|
+
editGraphic === null || editGraphic === void 0 || editGraphic.forEach(function (item) {
|
|
1149
|
+
return t.map.removeGraphic(item.id, 'draw');
|
|
1150
|
+
});
|
|
1151
|
+
_this8.setState({
|
|
1152
|
+
isDraw: false,
|
|
1153
|
+
isCloseDraw: true,
|
|
1154
|
+
isEndEdit: false,
|
|
1155
|
+
graphicValue: null,
|
|
1156
|
+
editGraphic: null
|
|
1157
|
+
}, function () {
|
|
1158
|
+
_this8.setState({
|
|
1159
|
+
isDraw: true,
|
|
1160
|
+
isCloseDraw: false,
|
|
1161
|
+
isEndEdit: true
|
|
1162
|
+
});
|
|
1163
|
+
});
|
|
1164
|
+
} else {
|
|
1165
|
+
_this8.setState({
|
|
1166
|
+
isDraw: true,
|
|
1167
|
+
graphicValue: null,
|
|
1168
|
+
editGraphic: null,
|
|
1169
|
+
isEndEdit: true
|
|
1170
|
+
}, function () {
|
|
1171
|
+
t.map.removeGraphic('drawnGraph', 'draw');
|
|
1172
|
+
t.setState({
|
|
1173
|
+
isEndEdit: false
|
|
1174
|
+
});
|
|
1175
|
+
});
|
|
1176
|
+
}
|
|
1177
|
+
_this8.callback('editDraw');
|
|
1178
|
+
},
|
|
1179
|
+
icon: getIcon('edit'),
|
|
1180
|
+
children: TextEnum.searchRedrawBtnText
|
|
1181
|
+
}) : null, this.multiDraw && /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Button, {
|
|
1182
|
+
onClick: this.continueDraw.bind(this),
|
|
1183
|
+
icon: getIcon('edit'),
|
|
1184
|
+
children: TextEnum.searchContinueDrawBtnText
|
|
1185
|
+
}), this.multiDraw && /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Button, {
|
|
1186
|
+
onClick: this.editGraphic.bind(this),
|
|
1187
|
+
icon: getIcon('edit'),
|
|
1188
|
+
children: TextEnum.searchEditGraphicBtnText
|
|
1189
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Button, {
|
|
1190
|
+
onClick: this.setFitView.bind(this),
|
|
1191
|
+
icon: getIcon('sync'),
|
|
1192
|
+
children: TextEnum.searchGlobalBtnText
|
|
1193
|
+
}), !this.multiDraw && this.map && this.computeGraphic()]
|
|
1194
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
1195
|
+
className: styles.top_right,
|
|
1196
|
+
children: [typeof customNodes == 'function' && customNodes(t.map), isShowOther ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
1197
|
+
className: styles.otherModal,
|
|
1198
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Checkbox, {
|
|
1199
|
+
checked: isShowOtherGraph,
|
|
1200
|
+
onChange: function onChange(e) {
|
|
1201
|
+
_this8.setState({
|
|
1202
|
+
isShowOtherGraph: e.target.checked
|
|
1203
|
+
});
|
|
1204
|
+
},
|
|
1205
|
+
children: otherText
|
|
1206
|
+
})
|
|
1207
|
+
}) : '', isChangeMapType && ['amap', 'bmap', 'tmap'].includes(mapType) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Dropdown, {
|
|
1208
|
+
placement: "bottom",
|
|
1209
|
+
overlay: /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Menu, {
|
|
1210
|
+
onClick: function onClick(_ref) {
|
|
1211
|
+
var key = _ref.key;
|
|
1212
|
+
_this8.setState({
|
|
1213
|
+
coverageType: key
|
|
1214
|
+
});
|
|
1215
|
+
},
|
|
1216
|
+
items: [{
|
|
1217
|
+
label: TextEnum.labelBaseMapStyleImgText,
|
|
1218
|
+
key: 'sl'
|
|
1219
|
+
}, {
|
|
1220
|
+
label: TextEnum.labelBaseMapStyleVecText,
|
|
1221
|
+
key: 'wx'
|
|
1222
|
+
}]
|
|
1223
|
+
}),
|
|
1224
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
1225
|
+
className: styles.mapTxt,
|
|
1226
|
+
style: {
|
|
1227
|
+
width: 'fit-content'
|
|
1228
|
+
},
|
|
1229
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_antd.Button, {
|
|
1230
|
+
children: [coverageType == 'wx' ? TextEnum.labelBaseMapStyleVecText : TextEnum.labelBaseMapStyleImgText, /*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
|
|
1231
|
+
src: require("../VtxMap/images/downoutlined.png"),
|
|
1232
|
+
width: "20px"
|
|
1233
|
+
})]
|
|
1234
|
+
})
|
|
1235
|
+
})
|
|
1236
|
+
})]
|
|
1237
|
+
})]
|
|
1238
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
1239
|
+
className: styles.content,
|
|
1240
|
+
style: {
|
|
1241
|
+
paddingLeft: '25px'
|
|
1242
|
+
},
|
|
1243
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
1244
|
+
className: "".concat(styles.content_left, " ").concat(isShowList ? styles.w_l : ''),
|
|
1245
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
1246
|
+
className: "".concat(isShowList ? styles.show : styles.hidden),
|
|
1247
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
1248
|
+
className: styles.listTitle,
|
|
1249
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
1250
|
+
className: styles.title,
|
|
1251
|
+
children: TextEnum.labelSearchResultText
|
|
1252
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
1253
|
+
onClick: function onClick() {
|
|
1254
|
+
return _this8.showOrhidden(false);
|
|
1255
|
+
},
|
|
1256
|
+
className: styles.btn,
|
|
1257
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_default2.VtxMapIcon, {
|
|
1258
|
+
type: "icon-doubleleft"
|
|
1259
|
+
})
|
|
1260
|
+
})]
|
|
1261
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
1262
|
+
className: styles.scrollauto,
|
|
1263
|
+
children: listMess.map(function (item, index) {
|
|
1264
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
1265
|
+
onClick: function onClick() {
|
|
1266
|
+
return _this8.chooseAddress(item.id);
|
|
1267
|
+
},
|
|
1268
|
+
className: "".concat(styles.lists, " ").concat(item.isSelect ? styles.select : ''),
|
|
1269
|
+
children: item.title
|
|
1270
|
+
}, index);
|
|
1271
|
+
})
|
|
1272
|
+
})]
|
|
1273
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
1274
|
+
onClick: function onClick() {
|
|
1275
|
+
return _this8.showOrhidden(true);
|
|
1276
|
+
},
|
|
1277
|
+
className: "".concat(styles.btn, " ").concat(!isShowList ? styles.show : styles.hidden),
|
|
1278
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_default2.VtxMapIcon, {
|
|
1279
|
+
type: "icon-doubleright"
|
|
1280
|
+
})
|
|
1281
|
+
})]
|
|
1282
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
1283
|
+
className: styles.content_right,
|
|
1284
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_VtxMap.VtxMap, _objectSpread({
|
|
1285
|
+
getMapInstance: function getMapInstance(map) {
|
|
1286
|
+
if (map) _this8.map = map;
|
|
1287
|
+
},
|
|
1288
|
+
mapType: mapType,
|
|
1289
|
+
mapStyle: mapStyle,
|
|
1290
|
+
mapServer: mapServer,
|
|
1291
|
+
wkid: wkid,
|
|
1292
|
+
mapId: t.mapId,
|
|
1293
|
+
setCenter: setCenter,
|
|
1294
|
+
mapCenter: mapCenter,
|
|
1295
|
+
minZoom: minZoom,
|
|
1296
|
+
maxZoom: maxZoom,
|
|
1297
|
+
mapZoomLevel: mapZoomLevel,
|
|
1298
|
+
setZoomLevel: setZoomLevel,
|
|
1299
|
+
mapPoints: mapPoints,
|
|
1300
|
+
mapLines: mapLines,
|
|
1301
|
+
mapPolygons: mapPolygons,
|
|
1302
|
+
mapCircles: mapCircles,
|
|
1303
|
+
mapVisiblePoints: mapVisiblePoints,
|
|
1304
|
+
setVisiblePoints: setVisiblePoints,
|
|
1305
|
+
isDoEdit: isDoEdit,
|
|
1306
|
+
isEndEdit: isEndEdit,
|
|
1307
|
+
editGraphicId: editGraphicId,
|
|
1308
|
+
editGraphicChange: this.editGraphicChange.bind(this),
|
|
1309
|
+
clickGraphic: this.clickGraphic.bind(this),
|
|
1310
|
+
clickMap: function clickMap() {
|
|
1311
|
+
t.isClickMap = true;
|
|
1312
|
+
},
|
|
1313
|
+
olProps: olProps,
|
|
1314
|
+
showControl: showControl,
|
|
1315
|
+
coverageType: coverageType,
|
|
1316
|
+
language: language
|
|
1317
|
+
}, drawProps))
|
|
1318
|
+
})]
|
|
1319
|
+
})]
|
|
1201
1320
|
})
|
|
1202
|
-
}
|
|
1203
|
-
className: styles.mapTxt,
|
|
1204
|
-
style: {
|
|
1205
|
-
width: 'fit-content'
|
|
1206
|
-
}
|
|
1207
|
-
}, /*#__PURE__*/_react["default"].createElement(_button["default"], null, coverageType == 'wx' ? TextEnum.labelBaseMapStyleVecText : TextEnum.labelBaseMapStyleImgText, /*#__PURE__*/_react["default"].createElement("img", {
|
|
1208
|
-
src: require("../VtxMap/images/downoutlined.png"),
|
|
1209
|
-
width: "20px"
|
|
1210
|
-
})))))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
1211
|
-
className: styles.content,
|
|
1212
|
-
style: {
|
|
1213
|
-
paddingLeft: '25px'
|
|
1214
|
-
}
|
|
1215
|
-
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
1216
|
-
className: "".concat(styles.content_left, " ").concat(isShowList ? styles.w_l : '')
|
|
1217
|
-
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
1218
|
-
className: "".concat(isShowList ? styles.show : styles.hidden)
|
|
1219
|
-
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
1220
|
-
className: styles.listTitle
|
|
1221
|
-
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
1222
|
-
className: styles.title
|
|
1223
|
-
}, TextEnum.labelSearchResultText), /*#__PURE__*/_react["default"].createElement("div", {
|
|
1224
|
-
onClick: function onClick() {
|
|
1225
|
-
return _this8.showOrhidden(false);
|
|
1226
|
-
},
|
|
1227
|
-
className: styles.btn
|
|
1228
|
-
}, /*#__PURE__*/_react["default"].createElement(_default2.VtxMapIcon, {
|
|
1229
|
-
type: "icon-doubleleft"
|
|
1230
|
-
}))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
1231
|
-
className: styles.scrollauto
|
|
1232
|
-
}, listMess.map(function (item, index) {
|
|
1233
|
-
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
1234
|
-
key: index,
|
|
1235
|
-
onClick: function onClick() {
|
|
1236
|
-
return _this8.chooseAddress(item.id);
|
|
1237
|
-
},
|
|
1238
|
-
className: "".concat(styles.lists, " ").concat(item.isSelect ? styles.select : '')
|
|
1239
|
-
}, item.title);
|
|
1240
|
-
}))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
1241
|
-
onClick: function onClick() {
|
|
1242
|
-
return _this8.showOrhidden(true);
|
|
1243
|
-
},
|
|
1244
|
-
className: "".concat(styles.btn, " ").concat(!isShowList ? styles.show : styles.hidden)
|
|
1245
|
-
}, /*#__PURE__*/_react["default"].createElement(_default2.VtxMapIcon, {
|
|
1246
|
-
type: "icon-doubleright"
|
|
1247
|
-
}))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
1248
|
-
className: styles.content_right
|
|
1249
|
-
}, /*#__PURE__*/_react["default"].createElement(_VtxMap.VtxMap, _extends({
|
|
1250
|
-
getMapInstance: function getMapInstance(map) {
|
|
1251
|
-
if (map) _this8.map = map;
|
|
1252
|
-
},
|
|
1253
|
-
mapType: mapType,
|
|
1254
|
-
mapStyle: mapStyle,
|
|
1255
|
-
mapServer: mapServer,
|
|
1256
|
-
wkid: wkid,
|
|
1257
|
-
mapId: t.mapId,
|
|
1258
|
-
setCenter: setCenter,
|
|
1259
|
-
mapCenter: mapCenter,
|
|
1260
|
-
minZoom: minZoom,
|
|
1261
|
-
maxZoom: maxZoom,
|
|
1262
|
-
mapZoomLevel: mapZoomLevel,
|
|
1263
|
-
setZoomLevel: setZoomLevel,
|
|
1264
|
-
mapPoints: mapPoints,
|
|
1265
|
-
mapLines: mapLines,
|
|
1266
|
-
mapPolygons: mapPolygons,
|
|
1267
|
-
mapCircles: mapCircles,
|
|
1268
|
-
mapVisiblePoints: mapVisiblePoints,
|
|
1269
|
-
setVisiblePoints: setVisiblePoints,
|
|
1270
|
-
isDoEdit: isDoEdit,
|
|
1271
|
-
isEndEdit: isEndEdit,
|
|
1272
|
-
editGraphicId: editGraphicId,
|
|
1273
|
-
editGraphicChange: this.editGraphicChange.bind(this),
|
|
1274
|
-
clickGraphic: this.clickGraphic.bind(this),
|
|
1275
|
-
clickMap: function clickMap() {
|
|
1276
|
-
t.isClickMap = true;
|
|
1277
|
-
},
|
|
1278
|
-
olProps: olProps,
|
|
1279
|
-
showControl: showControl,
|
|
1280
|
-
coverageType: coverageType,
|
|
1281
|
-
language: language
|
|
1282
|
-
}, drawProps))))));
|
|
1321
|
+
});
|
|
1283
1322
|
}
|
|
1284
1323
|
}, {
|
|
1285
1324
|
key: "initSearchMap",
|
|
@@ -1319,7 +1358,7 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
|
|
|
1319
1358
|
}, {
|
|
1320
1359
|
key: "UNSAFE_componentWillReceiveProps",
|
|
1321
1360
|
value: function UNSAFE_componentWillReceiveProps(nextProps) {
|
|
1322
|
-
var
|
|
1361
|
+
var _this10 = this;
|
|
1323
1362
|
var t = this;
|
|
1324
1363
|
this.isClickMap = false;
|
|
1325
1364
|
if (t.state.graphicType !== nextProps.graphicType && !!this.map) {
|
|
@@ -1354,36 +1393,36 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
|
|
|
1354
1393
|
setTimeout(function () {
|
|
1355
1394
|
//实现2+次进入时,清理数据
|
|
1356
1395
|
if (nextProps.modal1Visible) {
|
|
1357
|
-
|
|
1358
|
-
|
|
1396
|
+
_this10.clearList();
|
|
1397
|
+
_this10.setState({
|
|
1359
1398
|
setZoomLevel: true
|
|
1360
1399
|
}, function () {
|
|
1361
|
-
|
|
1400
|
+
_this10.setState({
|
|
1362
1401
|
setZoomLevel: false
|
|
1363
1402
|
});
|
|
1364
1403
|
});
|
|
1365
|
-
if (!!
|
|
1366
|
-
if (
|
|
1404
|
+
if (!!_this10.map && !!_this10.state.locationPoint[0] && nextProps.mapCenter && !!nextProps.mapCenter[0]) {
|
|
1405
|
+
if (_this10.map.getGraphic('locationPoint')) {
|
|
1367
1406
|
switch (nextProps.mapType) {
|
|
1368
1407
|
case 'bmap':
|
|
1369
|
-
|
|
1408
|
+
_this10.map.getGraphic('locationPoint').mapLayer.setPosition(new BMap.Point(nextProps.mapCenter[0], nextProps.mapCenter[1]));
|
|
1370
1409
|
break;
|
|
1371
1410
|
case 'amap':
|
|
1372
|
-
|
|
1411
|
+
_this10.map.getGraphic('locationPoint').mapLayer.setPosition(new AMap.LngLat(nextProps.mapCenter[0], nextProps.mapCenter[1]));
|
|
1373
1412
|
break;
|
|
1374
1413
|
case 'tmap':
|
|
1375
|
-
|
|
1414
|
+
_this10.map.getGraphic('locationPoint').mapLayer.setLngLat(new T.LngLat(nextProps.mapCenter[0], nextProps.mapCenter[1]));
|
|
1376
1415
|
break;
|
|
1377
1416
|
case 'gmap':
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1417
|
+
_this10.map.getGraphic('locationPoint').mapLayer.geometry.setLatitude(nextProps.mapCenter[1]);
|
|
1418
|
+
_this10.map.getGraphic('locationPoint').mapLayer.geometry.setLongitude(nextProps.mapCenter[0]);
|
|
1419
|
+
_this10.map.state.gis.graphics.refresh();
|
|
1381
1420
|
case 'olMap':
|
|
1382
|
-
|
|
1421
|
+
_this10.map.getGraphic('locationPoint').mapLayer.setGeometry(new ol.geom.Point(nextProps.mapCenter));
|
|
1383
1422
|
break;
|
|
1384
1423
|
}
|
|
1385
1424
|
}
|
|
1386
|
-
|
|
1425
|
+
_this10.map.setCenter(nextProps.mapCenter);
|
|
1387
1426
|
}
|
|
1388
1427
|
}
|
|
1389
1428
|
}, 100);
|
|
@@ -1398,8 +1437,9 @@ var VtxSearchMap = /*#__PURE__*/function (_React$Component) {
|
|
|
1398
1437
|
}
|
|
1399
1438
|
}
|
|
1400
1439
|
}]);
|
|
1401
|
-
|
|
1402
|
-
|
|
1440
|
+
return VtxSearchMap;
|
|
1441
|
+
}(_react.default.Component);
|
|
1442
|
+
var _default = exports.default = VtxSearchMap;
|
|
1403
1443
|
function formatNumber(num) {
|
|
1404
1444
|
return Number(num).toFixed(2);
|
|
1405
1445
|
}
|
|
@@ -1412,6 +1452,4 @@ function getAvg() {
|
|
|
1412
1452
|
sumLat += Number(item[1]);
|
|
1413
1453
|
});
|
|
1414
1454
|
return "".concat(sumLng / arr.length, ",").concat(sumLat / arr.length);
|
|
1415
|
-
}
|
|
1416
|
-
module.exports = exports["default"];
|
|
1417
|
-
//# sourceMappingURL=VtxSearchMap.js.map
|
|
1455
|
+
}
|