@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
package/lib/VtxMap/OMap/Map.js
CHANGED
|
@@ -4,41 +4,46 @@ 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
9
|
var _MapToolFunction = require("../MapToolFunction");
|
|
10
10
|
var _immutable = _interopRequireDefault(require("immutable"));
|
|
11
|
-
var _default2 =
|
|
12
|
-
|
|
13
|
-
function
|
|
11
|
+
var _default2 = _interopRequireWildcard(require("../../default"));
|
|
12
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
+
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); }
|
|
14
|
+
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; }
|
|
15
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
|
+
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
14
17
|
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; }
|
|
15
18
|
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; }
|
|
16
|
-
function _defineProperty(
|
|
17
|
-
function _toConsumableArray(
|
|
19
|
+
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; }
|
|
20
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
18
21
|
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."); }
|
|
19
|
-
function _unsupportedIterableToArray(
|
|
20
|
-
function _iterableToArray(
|
|
21
|
-
function _arrayWithoutHoles(
|
|
22
|
-
function _arrayLikeToArray(
|
|
23
|
-
function _classCallCheck(
|
|
24
|
-
function _defineProperties(
|
|
25
|
-
function _createClass(
|
|
26
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i
|
|
22
|
+
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); }
|
|
23
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
24
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
25
|
+
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; }
|
|
26
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
27
|
+
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); } }
|
|
28
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
29
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
27
30
|
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); }
|
|
28
|
-
function
|
|
29
|
-
function
|
|
30
|
-
function
|
|
31
|
-
function
|
|
32
|
-
function
|
|
33
|
-
function
|
|
34
|
-
function
|
|
35
|
-
var Set = _immutable
|
|
31
|
+
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); }
|
|
32
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
33
|
+
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); }; }
|
|
34
|
+
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); }
|
|
35
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
36
|
+
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; } }
|
|
37
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
38
|
+
var Set = _immutable.default.Set;
|
|
36
39
|
//公共地址配置
|
|
37
40
|
var Map = /*#__PURE__*/function (_React$Component) {
|
|
41
|
+
_inherits(Map, _React$Component);
|
|
42
|
+
var _super = _createSuper(Map);
|
|
38
43
|
function Map(props) {
|
|
39
44
|
var _this;
|
|
40
45
|
_classCallCheck(this, Map);
|
|
41
|
-
_this =
|
|
46
|
+
_this = _super.call(this, props);
|
|
42
47
|
_this.GM = new _MapToolFunction.graphicManage(); //初始化 图元管理方法
|
|
43
48
|
_this.initPointIndex = 0; //初始化地图时记录点当前位置
|
|
44
49
|
_this._cluster = null; //点聚合对象
|
|
@@ -83,9 +88,9 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
83
88
|
//地图上面的ids
|
|
84
89
|
circleIds: [],
|
|
85
90
|
//地图上圆的ids
|
|
86
|
-
editId:
|
|
91
|
+
editId: "",
|
|
87
92
|
//当前编辑的图元id
|
|
88
|
-
editGraphic:
|
|
93
|
+
editGraphic: "",
|
|
89
94
|
//当前编辑完后图元所有数据
|
|
90
95
|
boundaryInfo: [],
|
|
91
96
|
//当前画出的边界线的id和区域名
|
|
@@ -100,52 +105,53 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
100
105
|
};
|
|
101
106
|
_this.cacheImgRecord = {}; //缓存图片记录,避免多次加载缓存
|
|
102
107
|
// 图片缓存dom位置
|
|
103
|
-
var cacheImg = document.getElementById(
|
|
108
|
+
var cacheImg = document.getElementById("vtxomapdefaultimg");
|
|
104
109
|
if (!cacheImg) {
|
|
105
|
-
cacheImg = _this.cacheImg = document.createElement(
|
|
106
|
-
cacheImg.id =
|
|
107
|
-
cacheImg.style.display =
|
|
110
|
+
cacheImg = _this.cacheImg = document.createElement("div");
|
|
111
|
+
cacheImg.id = "vtxomapcacheImg";
|
|
112
|
+
cacheImg.style.display = "none";
|
|
108
113
|
document.body.appendChild(cacheImg);
|
|
109
114
|
}
|
|
110
115
|
_this.cacheImg = cacheImg;
|
|
111
116
|
//缓存默认点位地址
|
|
112
|
-
if (!document.getElementById(
|
|
117
|
+
if (!document.getElementById("vtxomapdefaultimg")) {
|
|
113
118
|
var defImg = new Image();
|
|
114
|
-
defImg.src = "".concat(_default2
|
|
115
|
-
defImg.id =
|
|
119
|
+
defImg.src = "".concat(_default2.default.mapServerURL, "/images/defaultMarker.png");
|
|
120
|
+
defImg.id = "vtxomapdefaultimg";
|
|
116
121
|
cacheImg.appendChild(defImg);
|
|
117
122
|
}
|
|
118
123
|
//加载地图
|
|
119
124
|
_this.loadMapJs();
|
|
120
125
|
return _this;
|
|
121
126
|
}
|
|
122
|
-
|
|
123
|
-
return _createClass(Map, [{
|
|
127
|
+
_createClass(Map, [{
|
|
124
128
|
key: "loadMapJs",
|
|
125
129
|
value: function loadMapJs() {
|
|
126
130
|
var t = this;
|
|
127
131
|
this.loadMapComplete = new Promise(function (resolve, reject) {
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
132
|
+
(0, _default2.ensurejQuery)().then(function () {
|
|
133
|
+
if (window.google) {
|
|
134
|
+
resolve(t.omap = window.google.maps);
|
|
135
|
+
} else {
|
|
136
|
+
//&language=zh-CN
|
|
137
|
+
//测试用地址,暂时只支持 10.10.11.227的ip
|
|
138
|
+
$.getScript("http://ditu.google.cn/maps/api/js?key=AIzaSyAelEHQosKi09YLhXwmw3OR5ggScxOda2A&libraries=geometry,visualization,drawing", function () {
|
|
139
|
+
var PointCollection = new Promise(function (resolve, reject) {
|
|
140
|
+
$.getScript("".concat(_default2.default.mapServerURL, "/GPointCollection.js"), function () {
|
|
141
|
+
resolve();
|
|
142
|
+
});
|
|
137
143
|
});
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
144
|
+
var OmapCluster = new Promise(function (resolve, reject) {
|
|
145
|
+
$.getScript("".concat(_default2.default.mapServerURL, "/omapCluster.js"), function () {
|
|
146
|
+
resolve();
|
|
147
|
+
});
|
|
148
|
+
});
|
|
149
|
+
Promise.all([PointCollection, OmapCluster]).then(function () {
|
|
150
|
+
resolve(t.omap = window.google.maps);
|
|
142
151
|
});
|
|
143
152
|
});
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
});
|
|
147
|
-
});
|
|
148
|
-
}
|
|
153
|
+
}
|
|
154
|
+
});
|
|
149
155
|
});
|
|
150
156
|
}
|
|
151
157
|
//初始化地图数据
|
|
@@ -315,9 +321,9 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
315
321
|
}
|
|
316
322
|
});
|
|
317
323
|
/*=================================start========================================*/
|
|
318
|
-
/*
|
|
319
|
-
|
|
320
|
-
|
|
324
|
+
/*
|
|
325
|
+
draw对象声明, 绘制返回方法实现
|
|
326
|
+
*/
|
|
321
327
|
if (!t._drawmanager) {
|
|
322
328
|
t._drawmanager = new google.maps.drawing.DrawingManager({
|
|
323
329
|
drawingControl: false
|
|
@@ -332,10 +338,10 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
332
338
|
});
|
|
333
339
|
}
|
|
334
340
|
/*=================================start========================================*/
|
|
335
|
-
/*
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
341
|
+
/*
|
|
342
|
+
声明OverlayView 类
|
|
343
|
+
用于切换lnglat和 pixel
|
|
344
|
+
*/
|
|
339
345
|
function CanvasProjectionOverlay() {}
|
|
340
346
|
CanvasProjectionOverlay.prototype = new google.maps.OverlayView();
|
|
341
347
|
CanvasProjectionOverlay.prototype.constructor = CanvasProjectionOverlay;
|
|
@@ -345,10 +351,10 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
345
351
|
this.canvasProjectionOverlay = new CanvasProjectionOverlay();
|
|
346
352
|
this.canvasProjectionOverlay.setMap(map);
|
|
347
353
|
/*=================================start========================================*/
|
|
348
|
-
/*
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
354
|
+
/*
|
|
355
|
+
重写marker对象,支持html
|
|
356
|
+
要使用google对象,所以在creatMap中声明
|
|
357
|
+
*/
|
|
352
358
|
var MyLabel = t.MyLabel = function (map) {
|
|
353
359
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
354
360
|
//编辑
|
|
@@ -377,9 +383,9 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
377
383
|
MyLabel.prototype.onAdd = function () {
|
|
378
384
|
//创建文字标签
|
|
379
385
|
if (!this._label) {
|
|
380
|
-
this._label = document.createElement(
|
|
386
|
+
this._label = document.createElement("div");
|
|
381
387
|
this._label.innerHTML = this.labelContent;
|
|
382
|
-
this._label.style.position =
|
|
388
|
+
this._label.style.position = "absolute";
|
|
383
389
|
this._label.className = this.labelClass;
|
|
384
390
|
//获取承载点位的框
|
|
385
391
|
var panes = this.getPanes();
|
|
@@ -404,8 +410,8 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
404
410
|
//将地理坐标转换成屏幕坐标
|
|
405
411
|
var position = overlayProjection.fromLatLngToDivPixel(this.lnglat);
|
|
406
412
|
if (position) {
|
|
407
|
-
this._label.style.left = position.x + parseFloat(this.labelOffset.x) +
|
|
408
|
-
this._label.style.top = position.y + parseFloat(this.labelOffset.y) +
|
|
413
|
+
this._label.style.left = position.x + parseFloat(this.labelOffset.x) + "px";
|
|
414
|
+
this._label.style.top = position.y + parseFloat(this.labelOffset.y) + "px";
|
|
409
415
|
}
|
|
410
416
|
};
|
|
411
417
|
//更新点位信息
|
|
@@ -452,7 +458,7 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
452
458
|
};
|
|
453
459
|
MyLabel.prototype.addListener = function (key, fun) {
|
|
454
460
|
var tt = this;
|
|
455
|
-
if (key ==
|
|
461
|
+
if (key == "dragend") {
|
|
456
462
|
//编辑返回函数
|
|
457
463
|
this.dragendFun = fun;
|
|
458
464
|
return false;
|
|
@@ -478,7 +484,7 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
478
484
|
}, 50);
|
|
479
485
|
};
|
|
480
486
|
MyLabel.prototype.removeListener = function (key) {
|
|
481
|
-
if (key ==
|
|
487
|
+
if (key == "dragend") {
|
|
482
488
|
this.dragendFun = function () {};
|
|
483
489
|
return false;
|
|
484
490
|
}
|
|
@@ -487,12 +493,12 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
487
493
|
}
|
|
488
494
|
};
|
|
489
495
|
//设置是否可以编辑
|
|
490
|
-
MyLabel.prototype.setDraggable = function (
|
|
491
|
-
this.editable =
|
|
492
|
-
if (
|
|
496
|
+
MyLabel.prototype.setDraggable = function (boolean) {
|
|
497
|
+
this.editable = boolean;
|
|
498
|
+
if (boolean) {
|
|
493
499
|
this.edit();
|
|
494
500
|
} else {
|
|
495
|
-
this._label.removeEventListener(
|
|
501
|
+
this._label.removeEventListener("mousedown", this.mdown);
|
|
496
502
|
}
|
|
497
503
|
};
|
|
498
504
|
//编辑时 事件和逻辑
|
|
@@ -501,41 +507,41 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
501
507
|
tt.mdown = function (event) {
|
|
502
508
|
event.stopPropagation();
|
|
503
509
|
//禁止文本选中
|
|
504
|
-
tt._label.className =
|
|
510
|
+
tt._label.className = "noselect";
|
|
505
511
|
// 记录原始位置
|
|
506
512
|
tt.editParam.sx = event.clientX;
|
|
507
513
|
tt.editParam.sy = event.clientY;
|
|
508
514
|
var mmEvent = function mmEvent(e) {
|
|
509
515
|
e.stopPropagation();
|
|
510
516
|
//计算与上一次的差值 累加到label dom上
|
|
511
|
-
tt._label.style.left = parseFloat(tt._label.style.left.replace(
|
|
512
|
-
tt._label.style.top = parseFloat(tt._label.style.top.replace(
|
|
517
|
+
tt._label.style.left = parseFloat(tt._label.style.left.replace("px", "")) + e.clientX - tt.editParam.sx + "px";
|
|
518
|
+
tt._label.style.top = parseFloat(tt._label.style.top.replace("px", "")) + e.clientY - tt.editParam.sy + "px";
|
|
513
519
|
//更新原始位置
|
|
514
520
|
tt.editParam.sx = e.clientX;
|
|
515
521
|
tt.editParam.sy = e.clientY;
|
|
516
522
|
};
|
|
517
|
-
var
|
|
523
|
+
var mupEvent = function mupEvent(e) {
|
|
518
524
|
e.stopPropagation();
|
|
519
525
|
//计算与上一次的差值 累加到label dom上
|
|
520
|
-
var x = parseFloat(tt._label.style.left.replace(
|
|
521
|
-
y = parseFloat(tt._label.style.top.replace(
|
|
526
|
+
var x = parseFloat(tt._label.style.left.replace("px", "")) + e.clientX - tt.editParam.sx,
|
|
527
|
+
y = parseFloat(tt._label.style.top.replace("px", "")) + e.clientY - tt.editParam.sy;
|
|
522
528
|
//计算经纬度,固定label的位置
|
|
523
|
-
tt._label.style.left = x +
|
|
524
|
-
tt._label.style.top = y +
|
|
529
|
+
tt._label.style.left = x + "px";
|
|
530
|
+
tt._label.style.top = y + "px";
|
|
525
531
|
var overlayProjection = tt.getProjection(),
|
|
526
532
|
latlng = overlayProjection.fromDivPixelToLatLng(new google.maps.Point(x, y));
|
|
527
533
|
tt.setPosition(latlng);
|
|
528
534
|
// 清空 文本禁选
|
|
529
|
-
tt._label.className =
|
|
535
|
+
tt._label.className = "";
|
|
530
536
|
tt.dragendFun(e);
|
|
531
537
|
//关闭全局监听
|
|
532
|
-
document.removeEventListener(
|
|
533
|
-
document.removeEventListener(
|
|
538
|
+
document.removeEventListener("mousemove", mmEvent);
|
|
539
|
+
document.removeEventListener("mouseup", mupEvent);
|
|
534
540
|
};
|
|
535
|
-
document.addEventListener(
|
|
536
|
-
document.addEventListener(
|
|
541
|
+
document.addEventListener("mousemove", mmEvent);
|
|
542
|
+
document.addEventListener("mouseup", mupEvent);
|
|
537
543
|
};
|
|
538
|
-
tt._label.addEventListener(
|
|
544
|
+
tt._label.addEventListener("mousedown", tt.mdown);
|
|
539
545
|
};
|
|
540
546
|
/*=================================end========================================*/
|
|
541
547
|
}
|
|
@@ -559,16 +565,16 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
559
565
|
var _alnglat, _alnglat2;
|
|
560
566
|
//根据天地图 覆盖物类型获取lnglat
|
|
561
567
|
switch (item.geometryType) {
|
|
562
|
-
case
|
|
568
|
+
case "point":
|
|
563
569
|
alnglat.push([item.geometry.x, item.geometry.y]);
|
|
564
570
|
break;
|
|
565
|
-
case
|
|
571
|
+
case "polyline":
|
|
566
572
|
(_alnglat = alnglat).push.apply(_alnglat, _toConsumableArray(item.geometry.paths));
|
|
567
573
|
break;
|
|
568
|
-
case
|
|
574
|
+
case "polygon":
|
|
569
575
|
(_alnglat2 = alnglat).push.apply(_alnglat2, _toConsumableArray(item.geometry.rings));
|
|
570
576
|
break;
|
|
571
|
-
case
|
|
577
|
+
case "circle":
|
|
572
578
|
alnglat.push([item.geometry.x, item.geometry.y]);
|
|
573
579
|
break;
|
|
574
580
|
}
|
|
@@ -595,31 +601,31 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
595
601
|
};
|
|
596
602
|
//算出 要展示的图元点位
|
|
597
603
|
switch (obj.fitView) {
|
|
598
|
-
case
|
|
604
|
+
case "point":
|
|
599
605
|
ls = getLngLats(pointIds);
|
|
600
606
|
break;
|
|
601
|
-
case
|
|
607
|
+
case "line":
|
|
602
608
|
ls = getLngLats(lineIds);
|
|
603
609
|
break;
|
|
604
|
-
case
|
|
610
|
+
case "polygon":
|
|
605
611
|
ls = getLngLats(polygonIds);
|
|
606
612
|
break;
|
|
607
|
-
case
|
|
613
|
+
case "circle":
|
|
608
614
|
ls = getLngLats(circleIds);
|
|
609
615
|
break;
|
|
610
|
-
case
|
|
616
|
+
case "all":
|
|
611
617
|
ls = getLngLats([].concat(_toConsumableArray(pointIds), _toConsumableArray(lineIds), _toConsumableArray(polygonIds), _toConsumableArray(circleIds)));
|
|
612
618
|
break;
|
|
613
619
|
default:
|
|
614
620
|
var ids = [];
|
|
615
621
|
if (obj.fitView instanceof Array) {
|
|
616
622
|
ids = obj.fitView;
|
|
617
|
-
} else if (typeof obj.fitView ===
|
|
618
|
-
ids = obj.fitView.split(
|
|
623
|
+
} else if (typeof obj.fitView === "string") {
|
|
624
|
+
ids = obj.fitView.split(",");
|
|
619
625
|
}
|
|
620
626
|
//支持传经纬度
|
|
621
627
|
if (ids[0] instanceof Array) {
|
|
622
|
-
ls = getLngLats(ids,
|
|
628
|
+
ls = getLngLats(ids, "lnglat");
|
|
623
629
|
} else {
|
|
624
630
|
ls = getLngLats(ids);
|
|
625
631
|
}
|
|
@@ -726,7 +732,7 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
726
732
|
var cg = {
|
|
727
733
|
width: 30,
|
|
728
734
|
height: 30,
|
|
729
|
-
labelContent:
|
|
735
|
+
labelContent: "",
|
|
730
736
|
labelPixelX: 0,
|
|
731
737
|
labelPixelY: 34,
|
|
732
738
|
BAnimationType: 3,
|
|
@@ -754,8 +760,8 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
754
760
|
});
|
|
755
761
|
var marker = null;
|
|
756
762
|
if (item.markerContent) {
|
|
757
|
-
/*自定义html加点
|
|
758
|
-
|
|
763
|
+
/*自定义html加点
|
|
764
|
+
用Label来实现,无法再添加label(高德有判断,实现不同)*/
|
|
759
765
|
//覆盖物参数
|
|
760
766
|
marker = new t.MyLabel(t.state.gis, {
|
|
761
767
|
labelContent: item.markerContent,
|
|
@@ -770,19 +776,19 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
770
776
|
// //添加label
|
|
771
777
|
if (item.canShowLabel && cg.labelContent) {
|
|
772
778
|
//label默认样式
|
|
773
|
-
var labelClass =
|
|
779
|
+
var labelClass = "label-content";
|
|
774
780
|
//接受label自定义样式
|
|
775
781
|
if (item.labelClass) {
|
|
776
|
-
labelClass = item.labelClass.split(
|
|
782
|
+
labelClass = item.labelClass.split(",").join(" ");
|
|
777
783
|
}
|
|
778
784
|
var label = new t.MyLabel(t.state.gis, {
|
|
779
785
|
isLabel: true,
|
|
780
786
|
labelClass: labelClass,
|
|
781
787
|
labelContent: cg.labelContent,
|
|
782
|
-
/*
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
788
|
+
/*
|
|
789
|
+
为和百度等地图相同的参数 加上g.markerContentY值
|
|
790
|
+
label是使用OverlayView手动实现,与marker没有关联的原因
|
|
791
|
+
*/
|
|
786
792
|
labelOffset: {
|
|
787
793
|
x: cg.labelPixelX,
|
|
788
794
|
y: cg.labelPixelY + cg.markerContentY
|
|
@@ -792,11 +798,11 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
792
798
|
//缓存
|
|
793
799
|
t.GM.setGraphic("".concat(item.id, "_vtxoMap_label"), label);
|
|
794
800
|
}
|
|
795
|
-
var iconUrl =
|
|
801
|
+
var iconUrl = "";
|
|
796
802
|
// 360deg 不需要旋转
|
|
797
803
|
if (parseFloat(cg.deg) % 360 != 0) {
|
|
798
804
|
iconUrl = new _MapToolFunction.RotateIcon({
|
|
799
|
-
url: item.url || "".concat(_default2
|
|
805
|
+
url: item.url || "".concat(_default2.default.mapServerURL, "/images/defaultMarker.png"),
|
|
800
806
|
width: cg.width,
|
|
801
807
|
height: cg.height
|
|
802
808
|
});
|
|
@@ -808,7 +814,7 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
808
814
|
},
|
|
809
815
|
size: new t.omap.Size(cg.width, cg.height),
|
|
810
816
|
scaledSize: new t.omap.Size(cg.width, cg.height),
|
|
811
|
-
url: parseFloat(cg.deg) % 360 != 0 ? iconUrl.setRotation(cg.deg).getUrl() : item.url || "".concat(_default2
|
|
817
|
+
url: parseFloat(cg.deg) % 360 != 0 ? iconUrl.setRotation(cg.deg).getUrl() : item.url || "".concat(_default2.default.mapServerURL, "/images/defaultMarker.png"),
|
|
812
818
|
labelOrigin: {
|
|
813
819
|
x: cg.labelPixelX,
|
|
814
820
|
y: cg.labelPixelY
|
|
@@ -833,7 +839,7 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
833
839
|
marker.setAnimation(google.maps.Animation.DROP);
|
|
834
840
|
}
|
|
835
841
|
//点击事件
|
|
836
|
-
var mClick = marker.addListener(
|
|
842
|
+
var mClick = marker.addListener("click", function (e) {
|
|
837
843
|
//避免鼠标在图元上 测距工具不起作用
|
|
838
844
|
if (t.rangingTool.isRanging) {
|
|
839
845
|
t.rangingToolFun(e);
|
|
@@ -842,11 +848,11 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
842
848
|
}
|
|
843
849
|
});
|
|
844
850
|
//鼠标移入事件
|
|
845
|
-
var mMouseover = marker.addListener(
|
|
851
|
+
var mMouseover = marker.addListener("mouseover", function (e) {
|
|
846
852
|
t.mouseOverGraphic(item.id, e);
|
|
847
853
|
});
|
|
848
854
|
//鼠标移出事件
|
|
849
|
-
var mMouseout = marker.addListener(
|
|
855
|
+
var mMouseout = marker.addListener("mouseout", function (e) {
|
|
850
856
|
t.mouseOutGraphic(item.id, e);
|
|
851
857
|
});
|
|
852
858
|
//缓存所有点的id
|
|
@@ -856,9 +862,9 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
856
862
|
attributes: _objectSpread(_objectSpread({}, item), {}, {
|
|
857
863
|
other: item
|
|
858
864
|
}),
|
|
859
|
-
geometryType:
|
|
865
|
+
geometryType: "point",
|
|
860
866
|
geometry: {
|
|
861
|
-
type:
|
|
867
|
+
type: "point",
|
|
862
868
|
x: item.longitude,
|
|
863
869
|
y: item.latitude
|
|
864
870
|
}
|
|
@@ -868,7 +874,7 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
868
874
|
mouseout: mMouseout
|
|
869
875
|
});
|
|
870
876
|
});
|
|
871
|
-
if (type !==
|
|
877
|
+
if (type !== "defined") {
|
|
872
878
|
//所有点缓存在state中
|
|
873
879
|
t.state.pointIds = psids;
|
|
874
880
|
// t.setState({
|
|
@@ -877,7 +883,7 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
877
883
|
}
|
|
878
884
|
};
|
|
879
885
|
//内部 不需要旋转图标的处理方式
|
|
880
|
-
if (type ==
|
|
886
|
+
if (type == "nodeg") {
|
|
881
887
|
apf();
|
|
882
888
|
} else {
|
|
883
889
|
//缓存图片 旋转功能使用
|
|
@@ -924,7 +930,7 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
924
930
|
var cg = {
|
|
925
931
|
width: 30,
|
|
926
932
|
height: 30,
|
|
927
|
-
labelContent:
|
|
933
|
+
labelContent: "",
|
|
928
934
|
labelPixelX: 0,
|
|
929
935
|
labelPixelY: 34,
|
|
930
936
|
BAnimationType: 3,
|
|
@@ -953,10 +959,10 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
953
959
|
var oldPosition = gc.getPosition();
|
|
954
960
|
//前后点位类型都是markerContent
|
|
955
961
|
if (gc.isMarkerContent && gc.isMarkerContent() && item.markerContent) {
|
|
956
|
-
/*
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
962
|
+
/*
|
|
963
|
+
自定义html加点
|
|
964
|
+
用Label来实现,无法再添加label(高德有判断,实现不同)
|
|
965
|
+
*/
|
|
960
966
|
//覆盖物参数
|
|
961
967
|
gc.setOptions({
|
|
962
968
|
labelContent: item.markerContent,
|
|
@@ -969,16 +975,16 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
969
975
|
} else if (gc.isMarkerContent && gc.isMarkerContent() && !item.markerContent) {
|
|
970
976
|
//markerContent类型转 marker-url类型
|
|
971
977
|
//清除事件
|
|
972
|
-
gc.removeListener(
|
|
973
|
-
gc.removeListener(
|
|
974
|
-
gc.removeListener(
|
|
978
|
+
gc.removeListener("click");
|
|
979
|
+
gc.removeListener("mouseover");
|
|
980
|
+
gc.removeListener("mouseout");
|
|
975
981
|
//删除原点位
|
|
976
982
|
gc.setMap(null);
|
|
977
|
-
var iconUrl =
|
|
983
|
+
var iconUrl = "";
|
|
978
984
|
// 360deg 不需要旋转
|
|
979
985
|
if (parseFloat(cg.deg) % 360 != 0) {
|
|
980
986
|
iconUrl = new _MapToolFunction.RotateIcon({
|
|
981
|
-
url: item.url || "".concat(_default2
|
|
987
|
+
url: item.url || "".concat(_default2.default.mapServerURL, "/images/defaultMarker.png"),
|
|
982
988
|
width: cg.width,
|
|
983
989
|
height: cg.height
|
|
984
990
|
});
|
|
@@ -990,7 +996,7 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
990
996
|
},
|
|
991
997
|
size: new t.omap.Size(cg.width, cg.height),
|
|
992
998
|
scaledSize: new t.omap.Size(cg.width, cg.height),
|
|
993
|
-
url: parseFloat(cg.deg) % 360 != 0 ? iconUrl.setRotation(cg.deg).getUrl() : item.url || "".concat(_default2
|
|
999
|
+
url: parseFloat(cg.deg) % 360 != 0 ? iconUrl.setRotation(cg.deg).getUrl() : item.url || "".concat(_default2.default.mapServerURL, "/images/defaultMarker.png"),
|
|
994
1000
|
labelOrigin: {
|
|
995
1001
|
x: cg.labelPixelX,
|
|
996
1002
|
y: cg.labelPixelY
|
|
@@ -1006,10 +1012,10 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
1006
1012
|
t.GM.setGraphic(item.id, gc);
|
|
1007
1013
|
if (item.canShowLabel && cg.labelContent) {
|
|
1008
1014
|
//label默认样式
|
|
1009
|
-
var labelClass =
|
|
1015
|
+
var labelClass = "label-content";
|
|
1010
1016
|
//接受label自定义样式
|
|
1011
1017
|
if (item.labelClass) {
|
|
1012
|
-
labelClass = item.labelClass.split(
|
|
1018
|
+
labelClass = item.labelClass.split(",").join(" ");
|
|
1013
1019
|
}
|
|
1014
1020
|
if (!gc_label) {
|
|
1015
1021
|
gc_label = new t.MyLabel();
|
|
@@ -1018,10 +1024,10 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
1018
1024
|
gc_label.setOptions({
|
|
1019
1025
|
labelClass: labelClass,
|
|
1020
1026
|
labelContent: cg.labelContent,
|
|
1021
|
-
/*
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1027
|
+
/*
|
|
1028
|
+
为和百度等地图相同的参数 加上g.markerContentY值
|
|
1029
|
+
label是使用OverlayView手动实现,与marker没有关联的原因
|
|
1030
|
+
*/
|
|
1025
1031
|
labelOffset: {
|
|
1026
1032
|
x: cg.labelPixelX,
|
|
1027
1033
|
y: cg.labelPixelY + cg.markerContentY
|
|
@@ -1030,7 +1036,7 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
1030
1036
|
gc.ishaveLabel = true;
|
|
1031
1037
|
}
|
|
1032
1038
|
//点击事件
|
|
1033
|
-
var mClick = gc.addListener(
|
|
1039
|
+
var mClick = gc.addListener("click", function (e) {
|
|
1034
1040
|
//避免鼠标在图元上 测距工具不起作用
|
|
1035
1041
|
if (t.rangingTool.isRanging) {
|
|
1036
1042
|
t.rangingToolFun(e);
|
|
@@ -1039,11 +1045,11 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
1039
1045
|
}
|
|
1040
1046
|
});
|
|
1041
1047
|
//鼠标移入事件
|
|
1042
|
-
var mMouseover = gc.addListener(
|
|
1048
|
+
var mMouseover = gc.addListener("mouseover", function (e) {
|
|
1043
1049
|
t.mouseOverGraphic(item.id, e);
|
|
1044
1050
|
});
|
|
1045
1051
|
//鼠标移出事件
|
|
1046
|
-
var mMouseout = gc.addListener(
|
|
1052
|
+
var mMouseout = gc.addListener("mouseout", function (e) {
|
|
1047
1053
|
t.mouseOutGraphic(item.id, e);
|
|
1048
1054
|
});
|
|
1049
1055
|
t.GM.setGraphicParam("".concat(item.id, "_omap_event"), {
|
|
@@ -1082,7 +1088,7 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
1082
1088
|
//切换 图元对象缓存
|
|
1083
1089
|
t.GM.setGraphic(item.id, gc);
|
|
1084
1090
|
//点击事件
|
|
1085
|
-
var _mClick = gc.addListener(
|
|
1091
|
+
var _mClick = gc.addListener("click", function (e) {
|
|
1086
1092
|
//避免鼠标在图元上 测距工具不起作用
|
|
1087
1093
|
if (t.rangingTool.isRanging) {
|
|
1088
1094
|
t.rangingToolFun(e);
|
|
@@ -1091,11 +1097,11 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
1091
1097
|
}
|
|
1092
1098
|
});
|
|
1093
1099
|
//鼠标移入事件
|
|
1094
|
-
var _mMouseover = gc.addListener(
|
|
1100
|
+
var _mMouseover = gc.addListener("mouseover", function (e) {
|
|
1095
1101
|
t.mouseOverGraphic(item.id, e);
|
|
1096
1102
|
});
|
|
1097
1103
|
//鼠标移出事件
|
|
1098
|
-
var _mMouseout = gc.addListener(
|
|
1104
|
+
var _mMouseout = gc.addListener("mouseout", function (e) {
|
|
1099
1105
|
t.mouseOutGraphic(item.id, e);
|
|
1100
1106
|
});
|
|
1101
1107
|
t.GM.setGraphicParam("".concat(item.id, "_omap_event"), {
|
|
@@ -1104,11 +1110,11 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
1104
1110
|
mouseout: _mMouseout
|
|
1105
1111
|
});
|
|
1106
1112
|
} else {
|
|
1107
|
-
var _iconUrl =
|
|
1113
|
+
var _iconUrl = "";
|
|
1108
1114
|
// 360deg 不需要旋转
|
|
1109
1115
|
if (parseFloat(cg.deg) % 360 != 0) {
|
|
1110
1116
|
_iconUrl = new _MapToolFunction.RotateIcon({
|
|
1111
|
-
url: item.url || "".concat(_default2
|
|
1117
|
+
url: item.url || "".concat(_default2.default.mapServerURL, "/images/defaultMarker.png"),
|
|
1112
1118
|
width: cg.width,
|
|
1113
1119
|
height: cg.height
|
|
1114
1120
|
});
|
|
@@ -1121,7 +1127,7 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
1121
1127
|
},
|
|
1122
1128
|
size: new t.omap.Size(cg.width, cg.height),
|
|
1123
1129
|
scaledSize: new t.omap.Size(cg.width, cg.height),
|
|
1124
|
-
url: parseFloat(cg.deg) % 360 != 0 ? _iconUrl.setRotation(cg.deg).getUrl() : item.url || "".concat(_default2
|
|
1130
|
+
url: parseFloat(cg.deg) % 360 != 0 ? _iconUrl.setRotation(cg.deg).getUrl() : item.url || "".concat(_default2.default.mapServerURL, "/images/defaultMarker.png"),
|
|
1125
1131
|
labelOrigin: {
|
|
1126
1132
|
x: cg.labelPixelX,
|
|
1127
1133
|
y: cg.labelPixelY
|
|
@@ -1130,10 +1136,10 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
1130
1136
|
gc.setIcon(_icon);
|
|
1131
1137
|
if (item.canShowLabel && cg.labelContent) {
|
|
1132
1138
|
//label默认样式
|
|
1133
|
-
var _labelClass =
|
|
1139
|
+
var _labelClass = "label-content";
|
|
1134
1140
|
//接受label自定义样式
|
|
1135
1141
|
if (item.labelClass) {
|
|
1136
|
-
_labelClass = item.labelClass.split(
|
|
1142
|
+
_labelClass = item.labelClass.split(",").join(" ");
|
|
1137
1143
|
}
|
|
1138
1144
|
if (!gc_label) {
|
|
1139
1145
|
gc_label = new t.MyLabel();
|
|
@@ -1142,10 +1148,10 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
1142
1148
|
gc_label.setOptions({
|
|
1143
1149
|
labelClass: _labelClass,
|
|
1144
1150
|
labelContent: cg.labelContent,
|
|
1145
|
-
/*
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1151
|
+
/*
|
|
1152
|
+
为和百度等地图相同的参数 加上g.markerContentY值
|
|
1153
|
+
label是使用OverlayView手动实现,与marker没有关联的原因
|
|
1154
|
+
*/
|
|
1149
1155
|
labelOffset: {
|
|
1150
1156
|
x: cg.labelPixelX,
|
|
1151
1157
|
y: cg.labelPixelY + cg.markerContentY
|
|
@@ -1177,9 +1183,9 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
1177
1183
|
attributes: _objectSpread(_objectSpread({}, item), {}, {
|
|
1178
1184
|
other: item
|
|
1179
1185
|
}),
|
|
1180
|
-
geometryType:
|
|
1186
|
+
geometryType: "point",
|
|
1181
1187
|
geometry: {
|
|
1182
|
-
type:
|
|
1188
|
+
type: "point",
|
|
1183
1189
|
x: item.longitude,
|
|
1184
1190
|
y: item.latitude
|
|
1185
1191
|
}
|
|
@@ -1192,7 +1198,7 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
1192
1198
|
t.moveAnimation();
|
|
1193
1199
|
};
|
|
1194
1200
|
//内部 不需要旋转图标的处理方式
|
|
1195
|
-
if (type ==
|
|
1201
|
+
if (type == "nodeg") {
|
|
1196
1202
|
upf();
|
|
1197
1203
|
} else {
|
|
1198
1204
|
//缓存图片 旋转功能使用
|
|
@@ -1237,10 +1243,10 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
1237
1243
|
}
|
|
1238
1244
|
//初始化默认参数
|
|
1239
1245
|
var cg = {
|
|
1240
|
-
color:
|
|
1246
|
+
color: "#277ffa",
|
|
1241
1247
|
pellucidity: 0.9,
|
|
1242
1248
|
lineWidth: 5,
|
|
1243
|
-
lineType:
|
|
1249
|
+
lineType: "solid",
|
|
1244
1250
|
isHidden: false
|
|
1245
1251
|
};
|
|
1246
1252
|
//合并参数
|
|
@@ -1249,16 +1255,16 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
1249
1255
|
}
|
|
1250
1256
|
// 线样式
|
|
1251
1257
|
var icons = [];
|
|
1252
|
-
if (cg.lineType ==
|
|
1258
|
+
if (cg.lineType == "dashed") {
|
|
1253
1259
|
var lineSymbol = {
|
|
1254
|
-
path:
|
|
1260
|
+
path: "M 0,-1 0,1",
|
|
1255
1261
|
strokeOpacity: 1,
|
|
1256
1262
|
scale: cg.lineWidth > 5 ? 5 : cg.lineWidth < 2.5 ? 2.5 : cg.lineWidth
|
|
1257
1263
|
};
|
|
1258
1264
|
icons = [{
|
|
1259
1265
|
icon: lineSymbol,
|
|
1260
|
-
offset:
|
|
1261
|
-
repeat:
|
|
1266
|
+
offset: "0",
|
|
1267
|
+
repeat: "20px"
|
|
1262
1268
|
}];
|
|
1263
1269
|
}
|
|
1264
1270
|
//处理线的点数组
|
|
@@ -1274,7 +1280,7 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
1274
1280
|
// 线颜色
|
|
1275
1281
|
strokeWeight: cg.lineWidth,
|
|
1276
1282
|
// 线宽
|
|
1277
|
-
strokeOpacity: cg.lineType ==
|
|
1283
|
+
strokeOpacity: cg.lineType == "dashed" ? 0 : cg.pellucidity,
|
|
1278
1284
|
// 线透明度
|
|
1279
1285
|
icons: icons
|
|
1280
1286
|
};
|
|
@@ -1292,7 +1298,7 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
1292
1298
|
//添加线至地图
|
|
1293
1299
|
line.setMap(t.state.gis);
|
|
1294
1300
|
//点击事件
|
|
1295
|
-
var mClick = line.addListener(
|
|
1301
|
+
var mClick = line.addListener("click", function (e) {
|
|
1296
1302
|
//避免鼠标在图元上 测距工具不起作用
|
|
1297
1303
|
if (t.rangingTool.isRanging) {
|
|
1298
1304
|
t.rangingToolFun(e);
|
|
@@ -1301,11 +1307,11 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
1301
1307
|
}
|
|
1302
1308
|
});
|
|
1303
1309
|
//鼠标移入事件
|
|
1304
|
-
var mMouseover = line.addListener(
|
|
1310
|
+
var mMouseover = line.addListener("mouseover", function (e) {
|
|
1305
1311
|
t.mouseOverGraphic(item.id, e);
|
|
1306
1312
|
});
|
|
1307
1313
|
//鼠标移出事件
|
|
1308
|
-
var mMouseout = line.addListener(
|
|
1314
|
+
var mMouseout = line.addListener("mouseout", function (e) {
|
|
1309
1315
|
t.mouseOutGraphic(item.id, e);
|
|
1310
1316
|
});
|
|
1311
1317
|
t.GM.setGraphic(item.id, line).setGraphicParam(item.id, {
|
|
@@ -1313,9 +1319,9 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
1313
1319
|
paths: item.paths,
|
|
1314
1320
|
other: item
|
|
1315
1321
|
}),
|
|
1316
|
-
geometryType:
|
|
1322
|
+
geometryType: "polyline",
|
|
1317
1323
|
geometry: {
|
|
1318
|
-
type:
|
|
1324
|
+
type: "polyline",
|
|
1319
1325
|
paths: item.paths
|
|
1320
1326
|
}
|
|
1321
1327
|
}).setGraphicParam("".concat(item.id, "_omap_event"), {
|
|
@@ -1324,7 +1330,7 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
1324
1330
|
mouseout: mMouseout
|
|
1325
1331
|
});
|
|
1326
1332
|
});
|
|
1327
|
-
if (type !==
|
|
1333
|
+
if (type !== "defined") {
|
|
1328
1334
|
t.state.lineIds = lsids;
|
|
1329
1335
|
// t.setState({
|
|
1330
1336
|
// lineIds: lsids
|
|
@@ -1352,10 +1358,10 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
1352
1358
|
var gc = t.GM.getGraphic(item.id);
|
|
1353
1359
|
//初始化默认参数
|
|
1354
1360
|
var cg = {
|
|
1355
|
-
color:
|
|
1361
|
+
color: "#277ffa",
|
|
1356
1362
|
pellucidity: 0.9,
|
|
1357
1363
|
lineWidth: 5,
|
|
1358
|
-
lineType:
|
|
1364
|
+
lineType: "solid",
|
|
1359
1365
|
//'solid' 'dashed'
|
|
1360
1366
|
isHidden: false
|
|
1361
1367
|
};
|
|
@@ -1365,16 +1371,16 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
1365
1371
|
}
|
|
1366
1372
|
// 线样式
|
|
1367
1373
|
var icons = [];
|
|
1368
|
-
if (cg.lineType ==
|
|
1374
|
+
if (cg.lineType == "dashed") {
|
|
1369
1375
|
var lineSymbol = {
|
|
1370
|
-
path:
|
|
1376
|
+
path: "M 0,-1 0,1",
|
|
1371
1377
|
strokeOpacity: 1,
|
|
1372
1378
|
scale: cg.lineWidth > 5 ? 5 : cg.lineWidth < 2.5 ? 2.5 : cg.lineWidth
|
|
1373
1379
|
};
|
|
1374
1380
|
icons = [{
|
|
1375
1381
|
icon: lineSymbol,
|
|
1376
|
-
offset:
|
|
1377
|
-
repeat:
|
|
1382
|
+
offset: "0",
|
|
1383
|
+
repeat: "20px"
|
|
1378
1384
|
}];
|
|
1379
1385
|
}
|
|
1380
1386
|
//处理线的点数组
|
|
@@ -1390,7 +1396,7 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
1390
1396
|
// 线颜色
|
|
1391
1397
|
strokeWeight: cg.lineWidth,
|
|
1392
1398
|
// 线宽
|
|
1393
|
-
strokeOpacity: cg.lineType ==
|
|
1399
|
+
strokeOpacity: cg.lineType == "dashed" ? 0 : cg.pellucidity,
|
|
1394
1400
|
// 线透明度
|
|
1395
1401
|
icons: icons
|
|
1396
1402
|
};
|
|
@@ -1409,9 +1415,9 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
1409
1415
|
paths: item.paths,
|
|
1410
1416
|
other: item
|
|
1411
1417
|
}),
|
|
1412
|
-
geometryType:
|
|
1418
|
+
geometryType: "polyline",
|
|
1413
1419
|
geometry: {
|
|
1414
|
-
type:
|
|
1420
|
+
type: "polyline",
|
|
1415
1421
|
paths: item.paths
|
|
1416
1422
|
}
|
|
1417
1423
|
});
|
|
@@ -1437,11 +1443,11 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
1437
1443
|
}
|
|
1438
1444
|
//初始化参数
|
|
1439
1445
|
var cg = {
|
|
1440
|
-
lineType:
|
|
1446
|
+
lineType: "solid",
|
|
1441
1447
|
lineWidth: 5,
|
|
1442
|
-
lineColor:
|
|
1448
|
+
lineColor: "#277ffa",
|
|
1443
1449
|
lineOpacity: 1,
|
|
1444
|
-
color:
|
|
1450
|
+
color: "#fff",
|
|
1445
1451
|
pellucidity: 0.5
|
|
1446
1452
|
// isHidden: false //后期需要再加
|
|
1447
1453
|
};
|
|
@@ -1470,7 +1476,7 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
1470
1476
|
//添加面至地图
|
|
1471
1477
|
polygon.setMap(t.state.gis);
|
|
1472
1478
|
//点击事件
|
|
1473
|
-
var mClick = polygon.addListener(
|
|
1479
|
+
var mClick = polygon.addListener("click", function (e) {
|
|
1474
1480
|
//避免鼠标在图元上 测距工具不起作用
|
|
1475
1481
|
if (t.rangingTool.isRanging) {
|
|
1476
1482
|
t.rangingToolFun(e);
|
|
@@ -1479,11 +1485,11 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
1479
1485
|
}
|
|
1480
1486
|
});
|
|
1481
1487
|
//鼠标移入事件
|
|
1482
|
-
var mMouseover = polygon.addListener(
|
|
1488
|
+
var mMouseover = polygon.addListener("mouseover", function (e) {
|
|
1483
1489
|
t.mouseOverGraphic(item.id, e);
|
|
1484
1490
|
});
|
|
1485
1491
|
//鼠标移出事件
|
|
1486
|
-
var mMouseout = polygon.addListener(
|
|
1492
|
+
var mMouseout = polygon.addListener("mouseout", function (e) {
|
|
1487
1493
|
t.mouseOutGraphic(item.id, e);
|
|
1488
1494
|
});
|
|
1489
1495
|
//缓存面id
|
|
@@ -1494,9 +1500,9 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
1494
1500
|
rings: item.rings,
|
|
1495
1501
|
other: item
|
|
1496
1502
|
}),
|
|
1497
|
-
geometryType:
|
|
1503
|
+
geometryType: "polygon",
|
|
1498
1504
|
geometry: {
|
|
1499
|
-
type:
|
|
1505
|
+
type: "polygon",
|
|
1500
1506
|
rings: item.rings
|
|
1501
1507
|
}
|
|
1502
1508
|
}).setGraphicParam("".concat(item.id, "_omap_event"), {
|
|
@@ -1527,11 +1533,11 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
1527
1533
|
var gc = t.GM.getGraphic(item.id);
|
|
1528
1534
|
//初始化参数
|
|
1529
1535
|
var cg = {
|
|
1530
|
-
lineType:
|
|
1536
|
+
lineType: "solid",
|
|
1531
1537
|
lineWidth: 5,
|
|
1532
|
-
lineColor:
|
|
1538
|
+
lineColor: "#277ffa",
|
|
1533
1539
|
lineOpacity: 1,
|
|
1534
|
-
color:
|
|
1540
|
+
color: "#fff",
|
|
1535
1541
|
pellucidity: 0.5
|
|
1536
1542
|
// isHidden: false //后期需要再加
|
|
1537
1543
|
};
|
|
@@ -1562,9 +1568,9 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
1562
1568
|
rings: item.rings,
|
|
1563
1569
|
other: item
|
|
1564
1570
|
}),
|
|
1565
|
-
geometryType:
|
|
1571
|
+
geometryType: "polygon",
|
|
1566
1572
|
geometry: {
|
|
1567
|
-
type:
|
|
1573
|
+
type: "polygon",
|
|
1568
1574
|
rings: item.rings
|
|
1569
1575
|
}
|
|
1570
1576
|
});
|
|
@@ -1592,11 +1598,11 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
1592
1598
|
return false;
|
|
1593
1599
|
}
|
|
1594
1600
|
var cg = {
|
|
1595
|
-
lineType:
|
|
1601
|
+
lineType: "solid",
|
|
1596
1602
|
lineWidth: 5,
|
|
1597
|
-
lineColor:
|
|
1603
|
+
lineColor: "#277ffa",
|
|
1598
1604
|
lineOpacity: 1,
|
|
1599
|
-
color:
|
|
1605
|
+
color: "#fff",
|
|
1600
1606
|
pellucidity: 0.5
|
|
1601
1607
|
// isHidden: false //后期需要在加
|
|
1602
1608
|
};
|
|
@@ -1624,7 +1630,7 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
1624
1630
|
//添加圆至地图
|
|
1625
1631
|
circle.setMap(t.state.gis);
|
|
1626
1632
|
//点击事件
|
|
1627
|
-
var mClick = circle.addListener(
|
|
1633
|
+
var mClick = circle.addListener("click", function (e) {
|
|
1628
1634
|
//避免鼠标在图元上 测距工具不起作用
|
|
1629
1635
|
if (t.rangingTool.isRanging) {
|
|
1630
1636
|
t.rangingToolFun(e);
|
|
@@ -1633,11 +1639,11 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
1633
1639
|
}
|
|
1634
1640
|
});
|
|
1635
1641
|
//鼠标移入事件
|
|
1636
|
-
var mMouseover = circle.addListener(
|
|
1642
|
+
var mMouseover = circle.addListener("mouseover", function (e) {
|
|
1637
1643
|
t.mouseOverGraphic(item.id, e);
|
|
1638
1644
|
});
|
|
1639
1645
|
//鼠标移出事件
|
|
1640
|
-
var mMouseout = circle.addListener(
|
|
1646
|
+
var mMouseout = circle.addListener("mouseout", function (e) {
|
|
1641
1647
|
t.mouseOutGraphic(item.id, e);
|
|
1642
1648
|
});
|
|
1643
1649
|
ccsids.push(item.id);
|
|
@@ -1646,9 +1652,9 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
1646
1652
|
attributes: _objectSpread(_objectSpread({}, item), {}, {
|
|
1647
1653
|
other: item
|
|
1648
1654
|
}),
|
|
1649
|
-
geometryType:
|
|
1655
|
+
geometryType: "circle",
|
|
1650
1656
|
geometry: {
|
|
1651
|
-
type:
|
|
1657
|
+
type: "circle",
|
|
1652
1658
|
x: item.longitude,
|
|
1653
1659
|
y: item.latitude,
|
|
1654
1660
|
radius: item.radius
|
|
@@ -1681,11 +1687,11 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
1681
1687
|
var gc = t.GM.getGraphic(item.id);
|
|
1682
1688
|
//获取原有的面属性,转换key值
|
|
1683
1689
|
var cg = {
|
|
1684
|
-
lineType:
|
|
1690
|
+
lineType: "solid",
|
|
1685
1691
|
lineWidth: 5,
|
|
1686
|
-
lineColor:
|
|
1692
|
+
lineColor: "#277ffa",
|
|
1687
1693
|
lineOpacity: 1,
|
|
1688
|
-
color:
|
|
1694
|
+
color: "#fff",
|
|
1689
1695
|
pellucidity: 0.5
|
|
1690
1696
|
// isHidden: false //后期需要在加
|
|
1691
1697
|
};
|
|
@@ -1716,9 +1722,9 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
1716
1722
|
attributes: _objectSpread(_objectSpread({}, item), {}, {
|
|
1717
1723
|
other: item
|
|
1718
1724
|
}),
|
|
1719
|
-
geometryType:
|
|
1725
|
+
geometryType: "circle",
|
|
1720
1726
|
geometry: {
|
|
1721
|
-
type:
|
|
1727
|
+
type: "circle",
|
|
1722
1728
|
x: item.longitude,
|
|
1723
1729
|
y: item.latitude,
|
|
1724
1730
|
radius: item.radius
|
|
@@ -1757,7 +1763,7 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
1757
1763
|
// maxIntensity: cg.max
|
|
1758
1764
|
};
|
|
1759
1765
|
if (cg.gradient) {
|
|
1760
|
-
option.gradient = [
|
|
1766
|
+
option.gradient = ["rgba(102,255, 0,0)"];
|
|
1761
1767
|
//将gradient排序,与其他地图的热力图数据一致
|
|
1762
1768
|
var sortArray = [];
|
|
1763
1769
|
for (var i in cg.gradient) {
|
|
@@ -1792,8 +1798,8 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
1792
1798
|
if (panes) {
|
|
1793
1799
|
if (!t.pointCollectionId) {
|
|
1794
1800
|
t.pointCollectionId = "".concat(t.props.mapId, "_vtx_gmap_html_pointCollection");
|
|
1795
|
-
var divpc = document.createElement(
|
|
1796
|
-
divpc.className =
|
|
1801
|
+
var divpc = document.createElement("div");
|
|
1802
|
+
divpc.className = "vtx_gmap_html_pointCollection_a";
|
|
1797
1803
|
divpc.style.top = "-".concat(t.state.gis.getDiv().offsetHeight / 2, "px");
|
|
1798
1804
|
divpc.style.left = "-".concat(t.state.gis.getDiv().offsetWidth / 2, "px");
|
|
1799
1805
|
divpc.id = t.pointCollectionId;
|
|
@@ -1921,19 +1927,19 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
1921
1927
|
}
|
|
1922
1928
|
var ids = [];
|
|
1923
1929
|
switch (type) {
|
|
1924
|
-
case
|
|
1930
|
+
case "point":
|
|
1925
1931
|
ids = t.state.pointIds;
|
|
1926
1932
|
break;
|
|
1927
|
-
case
|
|
1933
|
+
case "line":
|
|
1928
1934
|
ids = t.state.lineIds;
|
|
1929
1935
|
break;
|
|
1930
|
-
case
|
|
1936
|
+
case "polygon":
|
|
1931
1937
|
ids = t.state.polygonIds;
|
|
1932
1938
|
break;
|
|
1933
|
-
case
|
|
1939
|
+
case "circle":
|
|
1934
1940
|
ids = t.state.circleIds;
|
|
1935
1941
|
break;
|
|
1936
|
-
case
|
|
1942
|
+
case "draw":
|
|
1937
1943
|
if (t.state.drawIds.point.indexOf(id) > -1) {
|
|
1938
1944
|
t.state.drawIds.point.splice(t.state.drawIds.point.indexOf(id), 1);
|
|
1939
1945
|
}
|
|
@@ -1966,7 +1972,7 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
1966
1972
|
break;
|
|
1967
1973
|
}
|
|
1968
1974
|
if (id == t.state.editId) {
|
|
1969
|
-
t.state.editId =
|
|
1975
|
+
t.state.editId = "";
|
|
1970
1976
|
}
|
|
1971
1977
|
if (ids.indexOf(id) != -1) {
|
|
1972
1978
|
ids.splice(ids.indexOf(id), 1);
|
|
@@ -1997,17 +2003,17 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
1997
2003
|
id: id,
|
|
1998
2004
|
geometry: param.geometry
|
|
1999
2005
|
};
|
|
2000
|
-
if (param.geometry.type ==
|
|
2006
|
+
if (param.geometry.type == "polygon") {
|
|
2001
2007
|
if (google.maps.geometry && google.maps.geometry.spherical) {
|
|
2002
2008
|
obj.area = google.maps.geometry.spherical.computeArea(param.mapLayer.getPath().getArray());
|
|
2003
2009
|
} else {
|
|
2004
2010
|
obj.area = 0;
|
|
2005
2011
|
}
|
|
2006
2012
|
}
|
|
2007
|
-
if (param.geometry.type ==
|
|
2013
|
+
if (param.geometry.type == "polyline") {
|
|
2008
2014
|
obj.distance = t.calculateDistance(param.geometry.paths);
|
|
2009
2015
|
}
|
|
2010
|
-
if (param.geometry.type ==
|
|
2016
|
+
if (param.geometry.type == "circle") {
|
|
2011
2017
|
obj.area = Math.pow(param.geometry.radius, 2) * Math.PI;
|
|
2012
2018
|
if (t.editTimeout) {
|
|
2013
2019
|
clearTimeout(t.editTimeout);
|
|
@@ -2029,9 +2035,9 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
2029
2035
|
};
|
|
2030
2036
|
}
|
|
2031
2037
|
switch (gtp.geometryType) {
|
|
2032
|
-
case
|
|
2038
|
+
case "point":
|
|
2033
2039
|
graphic.setDraggable(true);
|
|
2034
|
-
t.editEvent[
|
|
2040
|
+
t.editEvent["dragend"] = graphic.addListener("dragend", t.editGraphicChange);
|
|
2035
2041
|
//判断是否是 markerContent 再判断是否有label
|
|
2036
2042
|
if (!gtp.attributes.markerContent && gLabel) {
|
|
2037
2043
|
//label事件对象 便于删除
|
|
@@ -2040,16 +2046,16 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
2040
2046
|
});
|
|
2041
2047
|
}
|
|
2042
2048
|
break;
|
|
2043
|
-
case
|
|
2044
|
-
case
|
|
2045
|
-
case
|
|
2049
|
+
case "polyline":
|
|
2050
|
+
case "polygon":
|
|
2051
|
+
case "rectangle":
|
|
2046
2052
|
graphic.setEditable(true);
|
|
2047
|
-
t.editEvent[
|
|
2053
|
+
t.editEvent["mouseup"] = graphic.addListener("mouseup", t.editGraphicChange);
|
|
2048
2054
|
break;
|
|
2049
|
-
case
|
|
2055
|
+
case "circle":
|
|
2050
2056
|
graphic.setEditable(true);
|
|
2051
|
-
t.editEvent[
|
|
2052
|
-
t.editEvent[
|
|
2057
|
+
t.editEvent["center_changed"] = graphic.addListener("center_changed", t.editGraphicChange);
|
|
2058
|
+
t.editEvent["radius_changed"] = graphic.addListener("radius_changed", t.editGraphicChange);
|
|
2053
2059
|
break;
|
|
2054
2060
|
}
|
|
2055
2061
|
t.setState({
|
|
@@ -2066,7 +2072,7 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
2066
2072
|
var gtp = t.GM.getGraphicParam(t.state.editId);
|
|
2067
2073
|
if (!graphic) return false;
|
|
2068
2074
|
switch (gtp.geometryType) {
|
|
2069
|
-
case
|
|
2075
|
+
case "point":
|
|
2070
2076
|
graphic.setDraggable(false);
|
|
2071
2077
|
if (graphic.removeListener) {
|
|
2072
2078
|
graphic.removeListener("dragend", t.editGraphicChange);
|
|
@@ -2082,10 +2088,10 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
2082
2088
|
}
|
|
2083
2089
|
}
|
|
2084
2090
|
break;
|
|
2085
|
-
case
|
|
2086
|
-
case
|
|
2087
|
-
case
|
|
2088
|
-
case
|
|
2091
|
+
case "polyline":
|
|
2092
|
+
case "polygon":
|
|
2093
|
+
case "rectangle":
|
|
2094
|
+
case "circle":
|
|
2089
2095
|
graphic.setEditable(false);
|
|
2090
2096
|
for (var _i2 in t.editEvent) {
|
|
2091
2097
|
if (t.editEvent[_i2]) {
|
|
@@ -2099,8 +2105,8 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
2099
2105
|
var editGraphic = t.state.editGraphic;
|
|
2100
2106
|
if (editGraphic) {
|
|
2101
2107
|
t.setState({
|
|
2102
|
-
editId:
|
|
2103
|
-
editGraphic:
|
|
2108
|
+
editId: "",
|
|
2109
|
+
editGraphic: ""
|
|
2104
2110
|
}, function () {
|
|
2105
2111
|
t.props.editGraphicChange(editGraphic);
|
|
2106
2112
|
});
|
|
@@ -2115,7 +2121,7 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
2115
2121
|
//先关闭(防止连点)
|
|
2116
2122
|
t._drawmanager.setDrawingMode(null);
|
|
2117
2123
|
//初始化参数
|
|
2118
|
-
drawParam.geometryType = obj.geometryType ||
|
|
2124
|
+
drawParam.geometryType = obj.geometryType || "point";
|
|
2119
2125
|
drawParam.parameter = obj.parameter ? _objectSpread({}, obj.parameter) : {};
|
|
2120
2126
|
drawParam.data = obj.data ? _objectSpread({}, obj.data) : {};
|
|
2121
2127
|
drawParam.data.id = (obj.data || {}).id || "draw".concat(new Date().getTime());
|
|
@@ -2128,7 +2134,7 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
2128
2134
|
}
|
|
2129
2135
|
var param = {};
|
|
2130
2136
|
var paramgcr = {};
|
|
2131
|
-
if (drawParam.geometryType ==
|
|
2137
|
+
if (drawParam.geometryType == "polygon" || drawParam.geometryType == "circle" || drawParam.geometryType == "rectangle") {
|
|
2132
2138
|
paramgcr.fillColor = drawParam.parameter.color;
|
|
2133
2139
|
paramgcr.strokeColor = drawParam.parameter.lineColor;
|
|
2134
2140
|
paramgcr.strokeOpacity = drawParam.parameter.lineOpacity;
|
|
@@ -2151,7 +2157,7 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
2151
2157
|
};
|
|
2152
2158
|
}
|
|
2153
2159
|
switch (drawParam.geometryType) {
|
|
2154
|
-
case
|
|
2160
|
+
case "point":
|
|
2155
2161
|
var icon = {
|
|
2156
2162
|
anchor: {
|
|
2157
2163
|
x: -drawParam.parameter.markerContentX || 15,
|
|
@@ -2159,7 +2165,7 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
2159
2165
|
},
|
|
2160
2166
|
size: new t.omap.Size(drawParam.parameter.width || 30, drawParam.parameter.height || 30),
|
|
2161
2167
|
scaledSize: new t.omap.Size(drawParam.parameter.width || 30, drawParam.parameter.height || 30),
|
|
2162
|
-
url: drawParam.parameter.url || "".concat(_default2
|
|
2168
|
+
url: drawParam.parameter.url || "".concat(_default2.default.mapServerURL, "/images/defaultMarker.png")
|
|
2163
2169
|
};
|
|
2164
2170
|
t._drawmanager.setOptions({
|
|
2165
2171
|
drawingControl: false,
|
|
@@ -2167,8 +2173,8 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
2167
2173
|
icon: icon
|
|
2168
2174
|
}
|
|
2169
2175
|
});
|
|
2170
|
-
t._drawmanager.setDrawingMode(
|
|
2171
|
-
t._drawmanagerEvent = t._drawmanager.addListener(
|
|
2176
|
+
t._drawmanager.setDrawingMode("marker");
|
|
2177
|
+
t._drawmanagerEvent = t._drawmanager.addListener("markercomplete", function (e) {
|
|
2172
2178
|
//清楚事件监听
|
|
2173
2179
|
t._drawmanagerEvent.remove();
|
|
2174
2180
|
//关闭绘制功能
|
|
@@ -2185,15 +2191,15 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
2185
2191
|
}
|
|
2186
2192
|
},
|
|
2187
2193
|
geometry: {
|
|
2188
|
-
type:
|
|
2194
|
+
type: "point",
|
|
2189
2195
|
x: e.getPosition().lng(),
|
|
2190
2196
|
y: e.getPosition().lat()
|
|
2191
2197
|
},
|
|
2192
|
-
geometryType:
|
|
2198
|
+
geometryType: "point",
|
|
2193
2199
|
mapLayer: e
|
|
2194
2200
|
};
|
|
2195
2201
|
//点击事件
|
|
2196
|
-
var mClick = e.addListener(
|
|
2202
|
+
var mClick = e.addListener("click", function (e) {
|
|
2197
2203
|
//避免鼠标在图元上 测距工具不起作用
|
|
2198
2204
|
if (t.rangingTool.isRanging) {
|
|
2199
2205
|
t.rangingToolFun(e);
|
|
@@ -2202,11 +2208,11 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
2202
2208
|
}
|
|
2203
2209
|
});
|
|
2204
2210
|
//鼠标移入事件
|
|
2205
|
-
var mMouseover = e.addListener(
|
|
2211
|
+
var mMouseover = e.addListener("mouseover", function (e) {
|
|
2206
2212
|
t.mouseOverGraphic(drawParam.data.id, e);
|
|
2207
2213
|
});
|
|
2208
2214
|
//鼠标移出事件
|
|
2209
|
-
var mMouseout = e.addListener(
|
|
2215
|
+
var mMouseout = e.addListener("mouseout", function (e) {
|
|
2210
2216
|
t.mouseOutGraphic(drawParam.data.id, e);
|
|
2211
2217
|
});
|
|
2212
2218
|
t.GM.setGraphicParam(drawParam.data.id, backobj).setGraphicParam("".concat(drawParam.data.id, "_omap_event"), {
|
|
@@ -2214,12 +2220,12 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
2214
2220
|
mouseover: mMouseover,
|
|
2215
2221
|
mouseout: mMouseout
|
|
2216
2222
|
});
|
|
2217
|
-
if (
|
|
2223
|
+
if ("drawEnd" in t.props) {
|
|
2218
2224
|
t.props.drawEnd(backobj);
|
|
2219
2225
|
}
|
|
2220
2226
|
});
|
|
2221
2227
|
break;
|
|
2222
|
-
case
|
|
2228
|
+
case "polyline":
|
|
2223
2229
|
param.strokeColor = drawParam.parameter.color;
|
|
2224
2230
|
param.strokeOpacity = drawParam.parameter.pellucidity;
|
|
2225
2231
|
param.strokeWeight = drawParam.parameter.lineWidth;
|
|
@@ -2227,8 +2233,8 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
2227
2233
|
drawingControl: false,
|
|
2228
2234
|
polylineOptions: param
|
|
2229
2235
|
});
|
|
2230
|
-
t._drawmanager.setDrawingMode(
|
|
2231
|
-
t._drawmanagerEvent = t._drawmanager.addListener(
|
|
2236
|
+
t._drawmanager.setDrawingMode("polyline");
|
|
2237
|
+
t._drawmanagerEvent = t._drawmanager.addListener("polylinecomplete", function (e) {
|
|
2232
2238
|
//清楚事件监听
|
|
2233
2239
|
t._drawmanagerEvent.remove();
|
|
2234
2240
|
//关闭绘制功能
|
|
@@ -2246,7 +2252,7 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
2246
2252
|
};
|
|
2247
2253
|
});
|
|
2248
2254
|
var backobj = {
|
|
2249
|
-
geometryType:
|
|
2255
|
+
geometryType: "polyline",
|
|
2250
2256
|
distance: t.calculateGraphicDistance(e.getPath().getArray()),
|
|
2251
2257
|
id: drawParam.data.id,
|
|
2252
2258
|
attributes: {
|
|
@@ -2259,14 +2265,14 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
2259
2265
|
},
|
|
2260
2266
|
mapLayer: e,
|
|
2261
2267
|
geometry: {
|
|
2262
|
-
type:
|
|
2268
|
+
type: "polyline",
|
|
2263
2269
|
lnglatAry: lnglatAry,
|
|
2264
2270
|
paths: (0, _MapToolFunction.getMaxMin)(paths).path
|
|
2265
2271
|
},
|
|
2266
2272
|
lnglatAry: lnglatAry
|
|
2267
2273
|
};
|
|
2268
2274
|
//点击事件
|
|
2269
|
-
var mClick = e.addListener(
|
|
2275
|
+
var mClick = e.addListener("click", function (e) {
|
|
2270
2276
|
//避免鼠标在图元上 测距工具不起作用
|
|
2271
2277
|
if (t.rangingTool.isRanging) {
|
|
2272
2278
|
t.rangingToolFun(e);
|
|
@@ -2275,11 +2281,11 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
2275
2281
|
}
|
|
2276
2282
|
});
|
|
2277
2283
|
//鼠标移入事件
|
|
2278
|
-
var mMouseover = e.addListener(
|
|
2284
|
+
var mMouseover = e.addListener("mouseover", function (e) {
|
|
2279
2285
|
t.mouseOverGraphic(drawParam.data.id, e);
|
|
2280
2286
|
});
|
|
2281
2287
|
//鼠标移出事件
|
|
2282
|
-
var mMouseout = e.addListener(
|
|
2288
|
+
var mMouseout = e.addListener("mouseout", function (e) {
|
|
2283
2289
|
t.mouseOutGraphic(drawParam.data.id, e);
|
|
2284
2290
|
});
|
|
2285
2291
|
t.GM.setGraphicParam(drawParam.data.id, backobj).setGraphicParam("".concat(item.id, "_omap_event"), {
|
|
@@ -2287,18 +2293,18 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
2287
2293
|
mouseover: mMouseover,
|
|
2288
2294
|
mouseout: mMouseout
|
|
2289
2295
|
});
|
|
2290
|
-
if (
|
|
2296
|
+
if ("drawEnd" in t.props) {
|
|
2291
2297
|
t.props.drawEnd(backobj);
|
|
2292
2298
|
}
|
|
2293
2299
|
});
|
|
2294
2300
|
break;
|
|
2295
|
-
case
|
|
2301
|
+
case "polygon":
|
|
2296
2302
|
t._drawmanager.setOptions({
|
|
2297
2303
|
drawingControl: false,
|
|
2298
2304
|
polygonOptions: paramgcr
|
|
2299
2305
|
});
|
|
2300
|
-
t._drawmanager.setDrawingMode(
|
|
2301
|
-
t._drawmanagerEvent = t._drawmanager.addListener(
|
|
2306
|
+
t._drawmanager.setDrawingMode("polygon");
|
|
2307
|
+
t._drawmanagerEvent = t._drawmanager.addListener("polygoncomplete", function (e) {
|
|
2302
2308
|
//清楚事件监听
|
|
2303
2309
|
t._drawmanagerEvent.remove();
|
|
2304
2310
|
//关闭绘制功能
|
|
@@ -2317,7 +2323,7 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
2317
2323
|
};
|
|
2318
2324
|
});
|
|
2319
2325
|
var backobj = {
|
|
2320
|
-
geometryType:
|
|
2326
|
+
geometryType: "polygon",
|
|
2321
2327
|
id: drawParam.data.id,
|
|
2322
2328
|
attributes: {
|
|
2323
2329
|
id: drawParam.data.id,
|
|
@@ -2331,7 +2337,7 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
2331
2337
|
},
|
|
2332
2338
|
mapLayer: e,
|
|
2333
2339
|
geometry: {
|
|
2334
|
-
type:
|
|
2340
|
+
type: "polygon",
|
|
2335
2341
|
lnglatAry: lnglatAry,
|
|
2336
2342
|
rings: (0, _MapToolFunction.getMaxMin)(paths).path,
|
|
2337
2343
|
_extent: (0, _MapToolFunction.getMaxMin)(paths)._extent,
|
|
@@ -2341,7 +2347,7 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
2341
2347
|
area: area
|
|
2342
2348
|
};
|
|
2343
2349
|
//点击事件
|
|
2344
|
-
var mClick = e.addListener(
|
|
2350
|
+
var mClick = e.addListener("click", function (e) {
|
|
2345
2351
|
//避免鼠标在图元上 测距工具不起作用
|
|
2346
2352
|
if (t.rangingTool.isRanging) {
|
|
2347
2353
|
t.rangingToolFun(e);
|
|
@@ -2350,11 +2356,11 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
2350
2356
|
}
|
|
2351
2357
|
});
|
|
2352
2358
|
//鼠标移入事件
|
|
2353
|
-
var mMouseover = e.addListener(
|
|
2359
|
+
var mMouseover = e.addListener("mouseover", function (e) {
|
|
2354
2360
|
t.mouseOverGraphic(drawParam.data.id, e);
|
|
2355
2361
|
});
|
|
2356
2362
|
//鼠标移出事件
|
|
2357
|
-
var mMouseout = e.addListener(
|
|
2363
|
+
var mMouseout = e.addListener("mouseout", function (e) {
|
|
2358
2364
|
t.mouseOutGraphic(drawParam.data.id, e);
|
|
2359
2365
|
});
|
|
2360
2366
|
t.GM.setGraphicParam(drawParam.data.id, backobj).setGraphicParam("".concat(item.id, "_omap_event"), {
|
|
@@ -2362,18 +2368,18 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
2362
2368
|
mouseover: mMouseover,
|
|
2363
2369
|
mouseout: mMouseout
|
|
2364
2370
|
});
|
|
2365
|
-
if (
|
|
2371
|
+
if ("drawEnd" in t.props) {
|
|
2366
2372
|
t.props.drawEnd(backobj);
|
|
2367
2373
|
}
|
|
2368
2374
|
});
|
|
2369
2375
|
break;
|
|
2370
|
-
case
|
|
2376
|
+
case "circle":
|
|
2371
2377
|
t._drawmanager.setOptions({
|
|
2372
2378
|
drawingControl: false,
|
|
2373
2379
|
circleOptions: paramgcr
|
|
2374
2380
|
});
|
|
2375
|
-
t._drawmanager.setDrawingMode(
|
|
2376
|
-
t._drawmanagerEvent = t._drawmanager.addListener(
|
|
2381
|
+
t._drawmanager.setDrawingMode("circle");
|
|
2382
|
+
t._drawmanagerEvent = t._drawmanager.addListener("circlecomplete", function (e) {
|
|
2377
2383
|
//清楚事件监听
|
|
2378
2384
|
t._drawmanagerEvent.remove();
|
|
2379
2385
|
//关闭绘制功能
|
|
@@ -2381,7 +2387,7 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
2381
2387
|
t.GM.setGraphic(drawParam.data.id, e);
|
|
2382
2388
|
var area = Math.PI * Math.pow(e.getRadius(), 2);
|
|
2383
2389
|
var backobj = {
|
|
2384
|
-
geometryType:
|
|
2390
|
+
geometryType: "circle",
|
|
2385
2391
|
id: drawParam.data.id,
|
|
2386
2392
|
attributes: {
|
|
2387
2393
|
id: drawParam.data.id,
|
|
@@ -2395,7 +2401,7 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
2395
2401
|
},
|
|
2396
2402
|
mapLayer: e,
|
|
2397
2403
|
geometry: {
|
|
2398
|
-
type:
|
|
2404
|
+
type: "circle",
|
|
2399
2405
|
x: e.getCenter().lng(),
|
|
2400
2406
|
y: e.getCenter().lat(),
|
|
2401
2407
|
radius: e.getRadius(),
|
|
@@ -2404,7 +2410,7 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
2404
2410
|
area: area
|
|
2405
2411
|
};
|
|
2406
2412
|
//点击事件
|
|
2407
|
-
var mClick = e.addListener(
|
|
2413
|
+
var mClick = e.addListener("click", function (e) {
|
|
2408
2414
|
//避免鼠标在图元上 测距工具不起作用
|
|
2409
2415
|
if (t.rangingTool.isRanging) {
|
|
2410
2416
|
t.rangingToolFun(e);
|
|
@@ -2413,11 +2419,11 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
2413
2419
|
}
|
|
2414
2420
|
});
|
|
2415
2421
|
//鼠标移入事件
|
|
2416
|
-
var mMouseover = e.addListener(
|
|
2422
|
+
var mMouseover = e.addListener("mouseover", function (e) {
|
|
2417
2423
|
t.mouseOverGraphic(drawParam.data.id, e);
|
|
2418
2424
|
});
|
|
2419
2425
|
//鼠标移出事件
|
|
2420
|
-
var mMouseout = e.addListener(
|
|
2426
|
+
var mMouseout = e.addListener("mouseout", function (e) {
|
|
2421
2427
|
t.mouseOutGraphic(drawParam.data.id, e);
|
|
2422
2428
|
});
|
|
2423
2429
|
t.GM.setGraphicParam(drawParam.data.id, backobj).setGraphicParam("".concat(item.id, "_omap_event"), {
|
|
@@ -2425,18 +2431,18 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
2425
2431
|
mouseover: mMouseover,
|
|
2426
2432
|
mouseout: mMouseout
|
|
2427
2433
|
});
|
|
2428
|
-
if (
|
|
2434
|
+
if ("drawEnd" in t.props) {
|
|
2429
2435
|
t.props.drawEnd(backobj);
|
|
2430
2436
|
}
|
|
2431
2437
|
});
|
|
2432
2438
|
break;
|
|
2433
|
-
case
|
|
2439
|
+
case "rectangle":
|
|
2434
2440
|
t._drawmanager.setOptions({
|
|
2435
2441
|
drawingControl: false,
|
|
2436
2442
|
rectangleOptions: paramgcr
|
|
2437
2443
|
});
|
|
2438
|
-
t._drawmanager.setDrawingMode(
|
|
2439
|
-
t._drawmanagerEvent = t._drawmanager.addListener(
|
|
2444
|
+
t._drawmanager.setDrawingMode("rectangle");
|
|
2445
|
+
t._drawmanagerEvent = t._drawmanager.addListener("rectanglecomplete", function (e) {
|
|
2440
2446
|
//清楚事件监听
|
|
2441
2447
|
t._drawmanagerEvent.remove();
|
|
2442
2448
|
//关闭绘制功能
|
|
@@ -2464,7 +2470,7 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
2464
2470
|
});
|
|
2465
2471
|
var area = t.calculatePointsDistance([lnglatJson.west, lnglatJson.south], [lnglatJson.east, lnglatJson.south]) * t.calculatePointsDistance([lnglatJson.east, lnglatJson.south], [lnglatJson.east, lnglatJson.north]);
|
|
2466
2472
|
var backobj = {
|
|
2467
|
-
geometryType:
|
|
2473
|
+
geometryType: "polygon",
|
|
2468
2474
|
id: drawParam.data.id,
|
|
2469
2475
|
attributes: {
|
|
2470
2476
|
id: drawParam.data.id,
|
|
@@ -2478,7 +2484,7 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
2478
2484
|
},
|
|
2479
2485
|
mapLayer: e,
|
|
2480
2486
|
geometry: {
|
|
2481
|
-
type:
|
|
2487
|
+
type: "polygon",
|
|
2482
2488
|
lnglatAry: lnglatAry,
|
|
2483
2489
|
rings: (0, _MapToolFunction.getMaxMin)(paths).path,
|
|
2484
2490
|
_extent: (0, _MapToolFunction.getMaxMin)(paths)._extent,
|
|
@@ -2488,7 +2494,7 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
2488
2494
|
area: area
|
|
2489
2495
|
};
|
|
2490
2496
|
//点击事件
|
|
2491
|
-
var mClick = e.addListener(
|
|
2497
|
+
var mClick = e.addListener("click", function (e) {
|
|
2492
2498
|
//避免鼠标在图元上 测距工具不起作用
|
|
2493
2499
|
if (t.rangingTool.isRanging) {
|
|
2494
2500
|
t.rangingToolFun(e);
|
|
@@ -2497,11 +2503,11 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
2497
2503
|
}
|
|
2498
2504
|
});
|
|
2499
2505
|
//鼠标移入事件
|
|
2500
|
-
var mMouseover = e.addListener(
|
|
2506
|
+
var mMouseover = e.addListener("mouseover", function (e) {
|
|
2501
2507
|
t.mouseOverGraphic(drawParam.data.id, e);
|
|
2502
2508
|
});
|
|
2503
2509
|
//鼠标移出事件
|
|
2504
|
-
var mMouseout = e.addListener(
|
|
2510
|
+
var mMouseout = e.addListener("mouseout", function (e) {
|
|
2505
2511
|
t.mouseOutGraphic(drawParam.data.id, e);
|
|
2506
2512
|
});
|
|
2507
2513
|
t.GM.setGraphicParam(drawParam.data.id, backobj).setGraphicParam("".concat(item.id, "_omap_event"), {
|
|
@@ -2509,7 +2515,7 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
2509
2515
|
mouseover: mMouseover,
|
|
2510
2516
|
mouseout: mMouseout
|
|
2511
2517
|
});
|
|
2512
|
-
if (
|
|
2518
|
+
if ("drawEnd" in t.props) {
|
|
2513
2519
|
t.props.drawEnd(backobj);
|
|
2514
2520
|
}
|
|
2515
2521
|
});
|
|
@@ -2525,31 +2531,31 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
2525
2531
|
var t = this;
|
|
2526
2532
|
t._drawmanager.setDrawingMode(null);
|
|
2527
2533
|
}
|
|
2528
|
-
/*
|
|
2529
|
-
|
|
2530
|
-
|
|
2534
|
+
/*
|
|
2535
|
+
事件处理
|
|
2536
|
+
*/
|
|
2531
2537
|
//点击图元事件
|
|
2532
2538
|
}, {
|
|
2533
2539
|
key: "clickGraphic",
|
|
2534
2540
|
value: function clickGraphic(id, e) {
|
|
2535
2541
|
var t = this;
|
|
2536
2542
|
//判断是否点击的测距关闭点位
|
|
2537
|
-
if (id && id.indexOf(
|
|
2543
|
+
if (id && id.indexOf("vtx_g_rang_end") > -1) {
|
|
2538
2544
|
var index = t.GM.getGraphicParam(id).attributes.index;
|
|
2539
2545
|
var ls = t.rangingTools[index].line,
|
|
2540
2546
|
ps = t.rangingTools[index].points;
|
|
2541
2547
|
//删除测距线
|
|
2542
|
-
t.removeGraphic(ls.id,
|
|
2548
|
+
t.removeGraphic(ls.id, "line");
|
|
2543
2549
|
//删除关闭点
|
|
2544
|
-
t.removeGraphic(id,
|
|
2550
|
+
t.removeGraphic(id, "point");
|
|
2545
2551
|
//删除中间点
|
|
2546
2552
|
for (var i = 0; i < ps.length; i++) {
|
|
2547
|
-
t.removeGraphic(ps[i].id,
|
|
2553
|
+
t.removeGraphic(ps[i].id, "point");
|
|
2548
2554
|
}
|
|
2549
2555
|
//清除测距数据缓存
|
|
2550
2556
|
delete t.rangingTools[index];
|
|
2551
2557
|
} else {
|
|
2552
|
-
if (id.indexOf(
|
|
2558
|
+
if (id.indexOf("vtx_g_rang_") > -1) {
|
|
2553
2559
|
return false;
|
|
2554
2560
|
}
|
|
2555
2561
|
//编辑中的图元关闭其他事件返回
|
|
@@ -2580,8 +2586,8 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
2580
2586
|
var t = this;
|
|
2581
2587
|
//编辑中的图元关闭其他事件返回
|
|
2582
2588
|
if (t.state.editId == id) return false;
|
|
2583
|
-
if (typeof t.props.mouseOverGraphic ===
|
|
2584
|
-
if (id.indexOf(
|
|
2589
|
+
if (typeof t.props.mouseOverGraphic === "function") {
|
|
2590
|
+
if (id.indexOf("vtx_g_rang_") > -1) {
|
|
2585
2591
|
return false;
|
|
2586
2592
|
}
|
|
2587
2593
|
var obj = {
|
|
@@ -2603,7 +2609,7 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
2603
2609
|
//编辑中的图元关闭其他事件返回
|
|
2604
2610
|
if (t.state.editId == id) return false;
|
|
2605
2611
|
if (typeof t.props.mouseOutGraphic === "function") {
|
|
2606
|
-
if (id.indexOf(
|
|
2612
|
+
if (id.indexOf("vtx_g_rang_") > -1) {
|
|
2607
2613
|
return false;
|
|
2608
2614
|
}
|
|
2609
2615
|
var obj = {
|
|
@@ -2617,9 +2623,9 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
2617
2623
|
t.props.mouseOutGraphic(obj);
|
|
2618
2624
|
}
|
|
2619
2625
|
}
|
|
2620
|
-
/*
|
|
2621
|
-
|
|
2622
|
-
|
|
2626
|
+
/*
|
|
2627
|
+
地图服务功能
|
|
2628
|
+
*/
|
|
2623
2629
|
//开启路况
|
|
2624
2630
|
}, {
|
|
2625
2631
|
key: "openTrafficInfo",
|
|
@@ -2650,7 +2656,7 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
2650
2656
|
circleIds = _t$state2.circleIds;
|
|
2651
2657
|
var gids = [].concat(_toConsumableArray(lineIds), _toConsumableArray(polygonIds), _toConsumableArray(circleIds));
|
|
2652
2658
|
t.state.gis.disableDoubleClickZoom = true;
|
|
2653
|
-
t.state.gis.draggableCursor =
|
|
2659
|
+
t.state.gis.draggableCursor = "crosshair";
|
|
2654
2660
|
//开启测距状态
|
|
2655
2661
|
if (!t.rangingTool.isRanging) {
|
|
2656
2662
|
t.rangingTool.isRanging = true;
|
|
@@ -2678,10 +2684,10 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
2678
2684
|
}
|
|
2679
2685
|
t.rangingTool.line.paths.push([].concat(lnlt));
|
|
2680
2686
|
//处理距离展示
|
|
2681
|
-
var distext = t.rangingTool.distance > 0 ? t.rangingTool.distance > 1000 ? "\u603B\u957F:".concat(Math.round(t.rangingTool.distance / 10) / 100, "\u516C\u91CC") : "\u603B\u957F:".concat(t.rangingTool.distance, "\u7C73") :
|
|
2687
|
+
var distext = t.rangingTool.distance > 0 ? t.rangingTool.distance > 1000 ? "\u603B\u957F:".concat(Math.round(t.rangingTool.distance / 10) / 100, "\u516C\u91CC") : "\u603B\u957F:".concat(t.rangingTool.distance, "\u7C73") : "起点";
|
|
2682
2688
|
//加点
|
|
2683
2689
|
var point = {
|
|
2684
|
-
id: t.rangingTool.points.length +
|
|
2690
|
+
id: t.rangingTool.points.length + "vtx_g_rang_p" + Math.random(),
|
|
2685
2691
|
longitude: lnlt[0],
|
|
2686
2692
|
latitude: lnlt[1],
|
|
2687
2693
|
markerContent: "\n <div style='z-index:1; height: 0px;'>\n <div class='vtx-g-rangingPoint'></div>\n <div class='vtx-g-rangingDistance'>".concat(distext, "</div>\n </div>\n "),
|
|
@@ -2697,12 +2703,12 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
2697
2703
|
if (t.rangingTool.line.paths.length == 2) {
|
|
2698
2704
|
//加线
|
|
2699
2705
|
t.rangingTool.line = {
|
|
2700
|
-
id:
|
|
2706
|
+
id: "vtx_g_rang_line" + Math.random(),
|
|
2701
2707
|
paths: _toConsumableArray(t.rangingTool.line.paths),
|
|
2702
2708
|
config: {
|
|
2703
|
-
color:
|
|
2709
|
+
color: "#108ee9",
|
|
2704
2710
|
lineWidth: 2,
|
|
2705
|
-
lineType:
|
|
2711
|
+
lineType: "solid"
|
|
2706
2712
|
}
|
|
2707
2713
|
};
|
|
2708
2714
|
t.addLine([t.rangingTool.line]);
|
|
@@ -2712,11 +2718,11 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
2712
2718
|
})]);
|
|
2713
2719
|
}
|
|
2714
2720
|
//双击 测距结束
|
|
2715
|
-
if (status ==
|
|
2721
|
+
if (status == "dbl") {
|
|
2716
2722
|
var rangkey = new Date().getTime() + Math.random();
|
|
2717
2723
|
//加结束点
|
|
2718
2724
|
var end = {
|
|
2719
|
-
id:
|
|
2725
|
+
id: "vtx_g_rang_end" + Math.random(),
|
|
2720
2726
|
longitude: lnlt[0],
|
|
2721
2727
|
latitude: lnlt[1],
|
|
2722
2728
|
markerContent: "\n <div>\n <div class='vtx-g-rang-exit'>x</div>\n </div>\n ",
|
|
@@ -2730,9 +2736,9 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
2730
2736
|
};
|
|
2731
2737
|
//用addpoint方法加点
|
|
2732
2738
|
t.addPoint([end]);
|
|
2733
|
-
//删除提示框
|
|
2734
|
-
t.removeGraphic(
|
|
2735
|
-
t.removeGraphic(
|
|
2739
|
+
//删除提示框
|
|
2740
|
+
t.removeGraphic("vtx_g_rang_showRangTool", "point");
|
|
2741
|
+
t.removeGraphic("vtx_g_rang_showRangTool_line", "line");
|
|
2736
2742
|
//缓存当前这一条测距数据
|
|
2737
2743
|
t.rangingTools[rangkey] = _objectSpread({}, t.rangingTool);
|
|
2738
2744
|
//回调测距参数
|
|
@@ -2745,7 +2751,7 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
2745
2751
|
}
|
|
2746
2752
|
}
|
|
2747
2753
|
};
|
|
2748
|
-
if (status !==
|
|
2754
|
+
if (status !== "dbl") {
|
|
2749
2755
|
//100毫秒内点击2次 则结束
|
|
2750
2756
|
if (!t.rangingTool.isDbclick) {
|
|
2751
2757
|
t.rangingTool.isDbclick = true;
|
|
@@ -2767,7 +2773,7 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
2767
2773
|
if (!t.rangingToolMoveFun) {
|
|
2768
2774
|
t.rangingToolMoveFun = function (e) {
|
|
2769
2775
|
//获取测距提示点位
|
|
2770
|
-
var rp = _objectSpread({}, t.GM.getGraphicParam(
|
|
2776
|
+
var rp = _objectSpread({}, t.GM.getGraphicParam("vtx_g_rang_showRangTool").attributes);
|
|
2771
2777
|
//删除多余数据,避免other层级太多
|
|
2772
2778
|
delete rp.other;
|
|
2773
2779
|
var rcontent = rp.markerContent;
|
|
@@ -2779,18 +2785,18 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
2779
2785
|
rcontent = "\n <div class='vtx-g-rang-showRangTool'>\n <div>".concat(distext, "</div>\n <div>\u5355\u51FB\u786E\u5B9A\u5730\u70B9,\u53CC\u51FB\u7ED3\u675F</div>\n </div>\n ");
|
|
2780
2786
|
//测距移动的线
|
|
2781
2787
|
var sl = {
|
|
2782
|
-
id:
|
|
2788
|
+
id: "vtx_g_rang_showRangTool_line",
|
|
2783
2789
|
paths: [[t.rangingTool.points[t.rangingTool.points.length - 1].longitude, t.rangingTool.points[t.rangingTool.points.length - 1].latitude], [e.latLng.lng(), e.latLng.lat()]],
|
|
2784
2790
|
config: {
|
|
2785
|
-
color:
|
|
2791
|
+
color: "#108ee9",
|
|
2786
2792
|
lineWidth: 2,
|
|
2787
|
-
lineType:
|
|
2793
|
+
lineType: "dashed",
|
|
2788
2794
|
pellucidity: 0.5
|
|
2789
2795
|
}
|
|
2790
2796
|
};
|
|
2791
|
-
if (!t.GM.getGraphic(
|
|
2797
|
+
if (!t.GM.getGraphic("vtx_g_rang_showRangTool_line")) {
|
|
2792
2798
|
t.addLine([sl]);
|
|
2793
|
-
t.GM.getGraphic(
|
|
2799
|
+
t.GM.getGraphic("vtx_g_rang_showRangTool_line").addListener("dblclick", function (e) {
|
|
2794
2800
|
t.rangingToolEndFun(e);
|
|
2795
2801
|
});
|
|
2796
2802
|
} else {
|
|
@@ -2802,7 +2808,7 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
2802
2808
|
latitude: e.latLng.lat(),
|
|
2803
2809
|
markerContent: rcontent
|
|
2804
2810
|
});
|
|
2805
|
-
t.updatePoint([rp],
|
|
2811
|
+
t.updatePoint([rp], "nodeg");
|
|
2806
2812
|
};
|
|
2807
2813
|
}
|
|
2808
2814
|
if (!t.rangingToolEndFun) {
|
|
@@ -2812,7 +2818,7 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
2812
2818
|
if (t.rangingTool.isRanging) {
|
|
2813
2819
|
if (t.rangingTool.points.length > 0) {
|
|
2814
2820
|
//处理点击和双击事件逻辑
|
|
2815
|
-
t.rangingToolFun(e,
|
|
2821
|
+
t.rangingToolFun(e, "dbl");
|
|
2816
2822
|
//回调测距参数
|
|
2817
2823
|
if (t.rangingTool.mapRangingTool) {
|
|
2818
2824
|
t.rangingTool.mapRangingTool({
|
|
@@ -2821,8 +2827,8 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
2821
2827
|
});
|
|
2822
2828
|
}
|
|
2823
2829
|
} else {
|
|
2824
|
-
//删除提示框
|
|
2825
|
-
t.removeGraphic(
|
|
2830
|
+
//删除提示框
|
|
2831
|
+
t.removeGraphic("vtx_g_rang_showRangTool", "point");
|
|
2826
2832
|
}
|
|
2827
2833
|
//关闭监听事件
|
|
2828
2834
|
for (var i in t.rangingTool.eventList) {
|
|
@@ -2850,18 +2856,18 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
2850
2856
|
}
|
|
2851
2857
|
//避免鼠标在图元上 测距工具不起作用
|
|
2852
2858
|
gids.forEach(function (item) {
|
|
2853
|
-
t.rangingTool.eventList[item] = t.GM.getGraphic(item).addListener(
|
|
2859
|
+
t.rangingTool.eventList[item] = t.GM.getGraphic(item).addListener("mousemove", function (e) {
|
|
2854
2860
|
if (t.rangingTool.isRanging && t.rangingToolMoveFun) {
|
|
2855
2861
|
t.rangingToolMoveFun(e);
|
|
2856
2862
|
}
|
|
2857
2863
|
});
|
|
2858
2864
|
});
|
|
2859
2865
|
//地图鼠标移入事件
|
|
2860
|
-
t.rangingTool.eventList[
|
|
2866
|
+
t.rangingTool.eventList["mouseover"] = t.state.gis.addListener("mouseover", function (e) {
|
|
2861
2867
|
//鼠标移出地图时,删除测距显示点
|
|
2862
2868
|
if (t.rangingTool.isRanging) {
|
|
2863
2869
|
var rp = {
|
|
2864
|
-
id:
|
|
2870
|
+
id: "vtx_g_rang_showRangTool",
|
|
2865
2871
|
longitude: e.latLng.lng(),
|
|
2866
2872
|
latitude: e.latLng.lat(),
|
|
2867
2873
|
markerContent: "\n <div class='vtx-g-rang-showRangTool'>\u5355\u51FB\u786E\u5B9A\u8D77\u70B9</div>\n ",
|
|
@@ -2870,25 +2876,25 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
2870
2876
|
markerContentY: 20
|
|
2871
2877
|
}
|
|
2872
2878
|
};
|
|
2873
|
-
t.addPoint([rp],
|
|
2879
|
+
t.addPoint([rp], "nodeg");
|
|
2874
2880
|
}
|
|
2875
2881
|
});
|
|
2876
2882
|
//地图鼠标移出事件
|
|
2877
|
-
t.rangingTool.eventList[
|
|
2883
|
+
t.rangingTool.eventList["mouseout"] = t.state.gis.addListener("mouseout", function (e) {
|
|
2878
2884
|
//鼠标移出地图时,删除测距显示点
|
|
2879
2885
|
if (t.rangingTool.isRanging) {
|
|
2880
|
-
t.removeGraphic(
|
|
2886
|
+
t.removeGraphic("vtx_g_rang_showRangTool", "point");
|
|
2881
2887
|
}
|
|
2882
2888
|
});
|
|
2883
2889
|
//地图鼠标移动事件
|
|
2884
|
-
t.rangingTool.eventList[
|
|
2890
|
+
t.rangingTool.eventList["mousemove"] = t.state.gis.addListener("mousemove", function (e) {
|
|
2885
2891
|
//鼠标移动地图时,删除测距显示点
|
|
2886
2892
|
if (t.rangingTool.isRanging && t.rangingToolMoveFun) {
|
|
2887
2893
|
t.rangingToolMoveFun(e);
|
|
2888
2894
|
}
|
|
2889
2895
|
});
|
|
2890
2896
|
//双击事件
|
|
2891
|
-
t.rangingTool.eventList[
|
|
2897
|
+
t.rangingTool.eventList["dblclick"] = t.state.gis.addListener("dblclick", function (e) {
|
|
2892
2898
|
t.rangingToolEndFun(e);
|
|
2893
2899
|
});
|
|
2894
2900
|
}
|
|
@@ -2929,10 +2935,10 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
2929
2935
|
return item.indexOf(vtx_g_rang) == -1;
|
|
2930
2936
|
});
|
|
2931
2937
|
} else {
|
|
2932
|
-
if (Object.prototype.toString.apply(arg) ===
|
|
2938
|
+
if (Object.prototype.toString.apply(arg) === "[object Array]") {
|
|
2933
2939
|
ary = arg;
|
|
2934
|
-
} else if (typeof arg ===
|
|
2935
|
-
ary = arg.split(
|
|
2940
|
+
} else if (typeof arg === "string") {
|
|
2941
|
+
ary = arg.split(",");
|
|
2936
2942
|
}
|
|
2937
2943
|
}
|
|
2938
2944
|
t.clusterIdList = ary;
|
|
@@ -2956,7 +2962,7 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
2956
2962
|
value: function clickMap() {
|
|
2957
2963
|
var t = this;
|
|
2958
2964
|
if (typeof t.props.clickMap === "function") {
|
|
2959
|
-
t.state.gis.addListener(
|
|
2965
|
+
t.state.gis.addListener("click", function (e) {
|
|
2960
2966
|
//测距点击事件
|
|
2961
2967
|
if (t.rangingTool.isRanging) {
|
|
2962
2968
|
t.rangingToolFun(e);
|
|
@@ -2978,8 +2984,8 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
2978
2984
|
key: "dragMapStart",
|
|
2979
2985
|
value: function dragMapStart() {
|
|
2980
2986
|
var t = this;
|
|
2981
|
-
if (typeof t.props.dragMapStart ===
|
|
2982
|
-
t.state.gis.addListener(
|
|
2987
|
+
if (typeof t.props.dragMapStart === "function") {
|
|
2988
|
+
t.state.gis.addListener("dragstart", function (e) {
|
|
2983
2989
|
var obj = t.getMapExtent();
|
|
2984
2990
|
obj.e = e;
|
|
2985
2991
|
t.props.dragMapStart(obj);
|
|
@@ -2991,8 +2997,8 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
2991
2997
|
key: "dragMapEnd",
|
|
2992
2998
|
value: function dragMapEnd() {
|
|
2993
2999
|
var t = this;
|
|
2994
|
-
if (typeof t.props.dragMapEnd ===
|
|
2995
|
-
t.state.gis.addListener(
|
|
3000
|
+
if (typeof t.props.dragMapEnd === "function") {
|
|
3001
|
+
t.state.gis.addListener("dragend", function (e) {
|
|
2996
3002
|
var obj = t.getMapExtent();
|
|
2997
3003
|
obj.e = e;
|
|
2998
3004
|
t.props.dragMapEnd(obj);
|
|
@@ -3004,11 +3010,11 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
3004
3010
|
key: "moveStart",
|
|
3005
3011
|
value: function moveStart() {
|
|
3006
3012
|
var t = this;
|
|
3007
|
-
if (typeof t.props.moveStart ===
|
|
3008
|
-
t.state.gis.addListener(
|
|
3013
|
+
if (typeof t.props.moveStart === "function") {
|
|
3014
|
+
t.state.gis.addListener("bounds_changed", function (e) {
|
|
3009
3015
|
if (t.pointCollectionId) {
|
|
3010
3016
|
$("#".concat(t.pointCollectionId)).css({
|
|
3011
|
-
visibility:
|
|
3017
|
+
visibility: "hidden"
|
|
3012
3018
|
});
|
|
3013
3019
|
}
|
|
3014
3020
|
//区别是否在移动状态
|
|
@@ -3028,11 +3034,11 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
3028
3034
|
key: "moveEndAndZoomEnd",
|
|
3029
3035
|
value: function moveEndAndZoomEnd() {
|
|
3030
3036
|
var t = this;
|
|
3031
|
-
if (typeof t.props.moveEnd ===
|
|
3032
|
-
t.state.gis.addListener(
|
|
3037
|
+
if (typeof t.props.moveEnd === "function" || typeof t.props.zoomEnd === "function" || typeof t.props.moveStart === "function" || typeof t.props.zoomStart === "function") {
|
|
3038
|
+
t.state.gis.addListener("idle", function (e) {
|
|
3033
3039
|
if (t.pointCollectionId) {
|
|
3034
3040
|
$("#".concat(t.pointCollectionId)).css({
|
|
3035
|
-
visibility:
|
|
3041
|
+
visibility: "inherit"
|
|
3036
3042
|
});
|
|
3037
3043
|
}
|
|
3038
3044
|
var obj = t.getMapExtent();
|
|
@@ -3046,11 +3052,11 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
3046
3052
|
}
|
|
3047
3053
|
if (t.oldZoomLevel != t.state.gis.getZoom()) {
|
|
3048
3054
|
t.oldZoomLevel = t.state.gis.getZoom();
|
|
3049
|
-
if (typeof t.props.zoomEnd ===
|
|
3055
|
+
if (typeof t.props.zoomEnd === "function") {
|
|
3050
3056
|
t.props.zoomEnd(obj);
|
|
3051
3057
|
}
|
|
3052
3058
|
} else {
|
|
3053
|
-
if (typeof t.props.moveEnd ===
|
|
3059
|
+
if (typeof t.props.moveEnd === "function") {
|
|
3054
3060
|
t.props.moveEnd(obj);
|
|
3055
3061
|
}
|
|
3056
3062
|
}
|
|
@@ -3066,11 +3072,11 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
3066
3072
|
key: "zoomStart",
|
|
3067
3073
|
value: function zoomStart() {
|
|
3068
3074
|
var t = this;
|
|
3069
|
-
if (typeof t.props.zoomStart ===
|
|
3070
|
-
t.state.gis.addListener(
|
|
3075
|
+
if (typeof t.props.zoomStart === "function") {
|
|
3076
|
+
t.state.gis.addListener("zoom_changed", function (e) {
|
|
3071
3077
|
if (t.pointCollectionId) {
|
|
3072
3078
|
$("#".concat(t.pointCollectionId)).css({
|
|
3073
|
-
visibility:
|
|
3079
|
+
visibility: "hidden"
|
|
3074
3080
|
});
|
|
3075
3081
|
}
|
|
3076
3082
|
if (!t.isZoomming) {
|
|
@@ -3120,7 +3126,7 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
3120
3126
|
lng = 0,
|
|
3121
3127
|
lat = 0;
|
|
3122
3128
|
switch (gp.geometryType) {
|
|
3123
|
-
case
|
|
3129
|
+
case "point":
|
|
3124
3130
|
lng = gg.getPosition().lng();
|
|
3125
3131
|
lat = gg.getPosition().lat();
|
|
3126
3132
|
p = _objectSpread(_objectSpread({}, gp), {}, {
|
|
@@ -3139,7 +3145,7 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
3139
3145
|
})
|
|
3140
3146
|
});
|
|
3141
3147
|
break;
|
|
3142
|
-
case
|
|
3148
|
+
case "polyline":
|
|
3143
3149
|
pts = gg.getPath().getArray().map(function (item, index) {
|
|
3144
3150
|
return [item.lng(), item.lat()];
|
|
3145
3151
|
});
|
|
@@ -3156,7 +3162,7 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
3156
3162
|
})
|
|
3157
3163
|
});
|
|
3158
3164
|
break;
|
|
3159
|
-
case
|
|
3165
|
+
case "polygon":
|
|
3160
3166
|
pts = gg.getPath().getArray().map(function (item, index) {
|
|
3161
3167
|
return [item.lng(), item.lat()];
|
|
3162
3168
|
});
|
|
@@ -3173,7 +3179,7 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
3173
3179
|
})
|
|
3174
3180
|
});
|
|
3175
3181
|
break;
|
|
3176
|
-
case
|
|
3182
|
+
case "circle":
|
|
3177
3183
|
lng = gg.getCenter().lng();
|
|
3178
3184
|
lat = gg.getCenter().lat();
|
|
3179
3185
|
var radius = gg.getRadius();
|
|
@@ -3243,7 +3249,7 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
3243
3249
|
ymin: 0
|
|
3244
3250
|
},
|
|
3245
3251
|
path = [];
|
|
3246
|
-
if (
|
|
3252
|
+
if ("getPath" in ms) {
|
|
3247
3253
|
path = ms.getPath().getArray();
|
|
3248
3254
|
path = path.map(function (item, index) {
|
|
3249
3255
|
var lng = item.lng(),
|
|
@@ -3381,7 +3387,7 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
3381
3387
|
url = urlright;
|
|
3382
3388
|
}
|
|
3383
3389
|
var icon = gc.getIcon(),
|
|
3384
|
-
iconUrl =
|
|
3390
|
+
iconUrl = "";
|
|
3385
3391
|
// 360deg 不需要旋转
|
|
3386
3392
|
if (ddeg % 360 != 0) {
|
|
3387
3393
|
iconUrl = new _MapToolFunction.RotateIcon({
|
|
@@ -3467,33 +3473,33 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
3467
3473
|
}
|
|
3468
3474
|
return deg;
|
|
3469
3475
|
}
|
|
3470
|
-
/*
|
|
3471
|
-
|
|
3472
|
-
|
|
3473
|
-
|
|
3476
|
+
/*
|
|
3477
|
+
匹配控件位置方法
|
|
3478
|
+
(谷歌地图有8个方位,为了统一,只使用左上,左下,右上,右下)
|
|
3479
|
+
*/
|
|
3474
3480
|
}, {
|
|
3475
3481
|
key: "matchControlPosition",
|
|
3476
3482
|
value: function matchControlPosition(location) {
|
|
3477
3483
|
var position = google.maps.ControlPosition.RIGHT_BOTTOM;
|
|
3478
3484
|
switch (location) {
|
|
3479
|
-
case
|
|
3485
|
+
case "tl":
|
|
3480
3486
|
position = google.maps.ControlPosition.LEFT_TOP;
|
|
3481
3487
|
break;
|
|
3482
|
-
case
|
|
3488
|
+
case "bl":
|
|
3483
3489
|
position = google.maps.ControlPosition.LEFT_BOTTOM;
|
|
3484
3490
|
break;
|
|
3485
|
-
case
|
|
3491
|
+
case "tr":
|
|
3486
3492
|
position = google.maps.ControlPosition.RIGHT_TOP;
|
|
3487
3493
|
break;
|
|
3488
|
-
case
|
|
3494
|
+
case "br":
|
|
3489
3495
|
position = google.maps.ControlPosition.RIGHT_BOTTOM;
|
|
3490
3496
|
break;
|
|
3491
3497
|
}
|
|
3492
3498
|
return position;
|
|
3493
3499
|
}
|
|
3494
|
-
/*
|
|
3495
|
-
|
|
3496
|
-
|
|
3500
|
+
/*
|
|
3501
|
+
地图内部需要公共方法
|
|
3502
|
+
*/
|
|
3497
3503
|
}, {
|
|
3498
3504
|
key: "calculatePointsDistance",
|
|
3499
3505
|
value: function calculatePointsDistance(fp, ep) {
|
|
@@ -3542,7 +3548,7 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
3542
3548
|
}, {
|
|
3543
3549
|
key: "deepEqual",
|
|
3544
3550
|
value: function deepEqual(a, b) {
|
|
3545
|
-
return _immutable
|
|
3551
|
+
return _immutable.default.is(_immutable.default.fromJS(a), _immutable.default.fromJS(b));
|
|
3546
3552
|
}
|
|
3547
3553
|
//数据解析(分析,新增,更新,删除对应的数据)
|
|
3548
3554
|
}, {
|
|
@@ -3618,11 +3624,11 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
3618
3624
|
value: function render() {
|
|
3619
3625
|
var t = this;
|
|
3620
3626
|
var _map = this.props;
|
|
3621
|
-
return /*#__PURE__*/
|
|
3627
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
3622
3628
|
id: _map.mapId,
|
|
3623
3629
|
style: {
|
|
3624
|
-
width:
|
|
3625
|
-
height:
|
|
3630
|
+
width: "100%",
|
|
3631
|
+
height: "100%"
|
|
3626
3632
|
}
|
|
3627
3633
|
});
|
|
3628
3634
|
}
|
|
@@ -3703,7 +3709,7 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
3703
3709
|
|
|
3704
3710
|
/*添加海量点*/
|
|
3705
3711
|
if (mapPointCollection instanceof Array && props.mapPointCollection instanceof Array && !t.deepEqual(mapPointCollection, props.mapPointCollection)) {
|
|
3706
|
-
var _t$dataMatch = t.dataMatch(props.mapPointCollection, mapPointCollection,
|
|
3712
|
+
var _t$dataMatch = t.dataMatch(props.mapPointCollection, mapPointCollection, "id"),
|
|
3707
3713
|
deletedDataIDs = _t$dataMatch.deletedDataIDs,
|
|
3708
3714
|
addedData = _t$dataMatch.addedData,
|
|
3709
3715
|
updatedData = _t$dataMatch.updatedData;
|
|
@@ -3711,14 +3717,14 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
3711
3717
|
t.addPointCollection(addedData);
|
|
3712
3718
|
t.updatePointCollection(updatedData);
|
|
3713
3719
|
}
|
|
3714
|
-
if (typeof isclearAllPointCollection ==
|
|
3720
|
+
if (typeof isclearAllPointCollection == "boolean" && isclearAllPointCollection || isclearAllPointCollection && isclearAllPointCollection !== t.props.isclearAllPointCollection) {
|
|
3715
3721
|
t.clearAllPointCollection();
|
|
3716
3722
|
}
|
|
3717
|
-
/*点数据处理
|
|
3718
|
-
|
|
3719
|
-
|
|
3720
|
-
|
|
3721
|
-
|
|
3723
|
+
/*点数据处理
|
|
3724
|
+
pointData[2]相同的点,执行刷新
|
|
3725
|
+
pointData[1]的数据在idsForGraphicId中不存在的,执行新增
|
|
3726
|
+
pointData[0]数据中多余的id,执行删除
|
|
3727
|
+
*/
|
|
3722
3728
|
if (mapPoints instanceof Array && props.mapPoints instanceof Array && !t.deepEqual(mapPoints, props.mapPoints)) {
|
|
3723
3729
|
var oldMapPoints = props.mapPoints;
|
|
3724
3730
|
var newMapPoints = mapPoints;
|
|
@@ -3731,7 +3737,7 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
3731
3737
|
return item.id !== editGraphicId;
|
|
3732
3738
|
});
|
|
3733
3739
|
}
|
|
3734
|
-
var _t$dataMatch2 = t.dataMatch(oldMapPoints, newMapPoints,
|
|
3740
|
+
var _t$dataMatch2 = t.dataMatch(oldMapPoints, newMapPoints, "id"),
|
|
3735
3741
|
_deletedDataIDs = _t$dataMatch2.deletedDataIDs,
|
|
3736
3742
|
_addedData = _t$dataMatch2.addedData,
|
|
3737
3743
|
_updatedData = _t$dataMatch2.updatedData;
|
|
@@ -3747,7 +3753,7 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
3747
3753
|
try {
|
|
3748
3754
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
3749
3755
|
var id = _step.value;
|
|
3750
|
-
t.removeGraphic(id,
|
|
3756
|
+
t.removeGraphic(id, "point");
|
|
3751
3757
|
}
|
|
3752
3758
|
//增加
|
|
3753
3759
|
} catch (err) {
|
|
@@ -3759,10 +3765,10 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
3759
3765
|
//更新
|
|
3760
3766
|
t.updatePoint([].concat(_toConsumableArray(upds), _toConsumableArray(otherupds)));
|
|
3761
3767
|
}
|
|
3762
|
-
/*
|
|
3763
|
-
|
|
3764
|
-
|
|
3765
|
-
|
|
3768
|
+
/*
|
|
3769
|
+
面数据处理
|
|
3770
|
+
先全删除,再新增
|
|
3771
|
+
*/
|
|
3766
3772
|
if (mapPolygons instanceof Array && props.mapPolygons instanceof Array && !t.deepEqual(mapPolygons, props.mapPolygons)) {
|
|
3767
3773
|
var oldMapPolygons = props.mapPolygons;
|
|
3768
3774
|
var newMapPolygons = mapPolygons;
|
|
@@ -3774,7 +3780,7 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
3774
3780
|
return item.id !== editGraphicId;
|
|
3775
3781
|
});
|
|
3776
3782
|
}
|
|
3777
|
-
var _t$dataMatch3 = t.dataMatch(oldMapPolygons, newMapPolygons,
|
|
3783
|
+
var _t$dataMatch3 = t.dataMatch(oldMapPolygons, newMapPolygons, "id"),
|
|
3778
3784
|
_deletedDataIDs2 = _t$dataMatch3.deletedDataIDs,
|
|
3779
3785
|
_addedData2 = _t$dataMatch3.addedData,
|
|
3780
3786
|
_updatedData2 = _t$dataMatch3.updatedData;
|
|
@@ -3790,7 +3796,7 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
3790
3796
|
try {
|
|
3791
3797
|
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
3792
3798
|
var _id2 = _step2.value;
|
|
3793
|
-
t.removeGraphic(_id2,
|
|
3799
|
+
t.removeGraphic(_id2, "polygon");
|
|
3794
3800
|
}
|
|
3795
3801
|
//增加
|
|
3796
3802
|
} catch (err) {
|
|
@@ -3802,10 +3808,10 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
3802
3808
|
//更新
|
|
3803
3809
|
t.updatePolygon([].concat(_toConsumableArray(_upds), _toConsumableArray(_otherupds)));
|
|
3804
3810
|
}
|
|
3805
|
-
/*
|
|
3806
|
-
|
|
3807
|
-
|
|
3808
|
-
|
|
3811
|
+
/*
|
|
3812
|
+
圆数据处理
|
|
3813
|
+
先全删除,再新增
|
|
3814
|
+
*/
|
|
3809
3815
|
if (mapCircles instanceof Array && props.mapCircles instanceof Array && !t.deepEqual(mapCircles, props.mapCircles)) {
|
|
3810
3816
|
var oldMapCircles = props.mapCircles;
|
|
3811
3817
|
var newMapCircles = mapCircles;
|
|
@@ -3817,7 +3823,7 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
3817
3823
|
return item.id !== editGraphicId;
|
|
3818
3824
|
});
|
|
3819
3825
|
}
|
|
3820
|
-
var _t$dataMatch4 = t.dataMatch(oldMapCircles, newMapCircles,
|
|
3826
|
+
var _t$dataMatch4 = t.dataMatch(oldMapCircles, newMapCircles, "id"),
|
|
3821
3827
|
_deletedDataIDs3 = _t$dataMatch4.deletedDataIDs,
|
|
3822
3828
|
_addedData3 = _t$dataMatch4.addedData,
|
|
3823
3829
|
_updatedData3 = _t$dataMatch4.updatedData;
|
|
@@ -3833,7 +3839,7 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
3833
3839
|
try {
|
|
3834
3840
|
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
3835
3841
|
var _id3 = _step3.value;
|
|
3836
|
-
t.removeGraphic(_id3,
|
|
3842
|
+
t.removeGraphic(_id3, "circle");
|
|
3837
3843
|
}
|
|
3838
3844
|
//增加
|
|
3839
3845
|
} catch (err) {
|
|
@@ -3845,10 +3851,10 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
3845
3851
|
//更新
|
|
3846
3852
|
t.updateCircle([].concat(_toConsumableArray(_upds2), _toConsumableArray(_otherupds2)));
|
|
3847
3853
|
}
|
|
3848
|
-
/*
|
|
3849
|
-
|
|
3850
|
-
|
|
3851
|
-
|
|
3854
|
+
/*
|
|
3855
|
+
线数据处理
|
|
3856
|
+
先全删除,再新增
|
|
3857
|
+
*/
|
|
3852
3858
|
if (mapLines instanceof Array && props.mapLines instanceof Array && !t.deepEqual(mapLines, props.mapLines)) {
|
|
3853
3859
|
var oldMapLines = props.mapLines;
|
|
3854
3860
|
var newMapLines = mapLines;
|
|
@@ -3860,7 +3866,7 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
3860
3866
|
return item.id !== editGraphicId;
|
|
3861
3867
|
});
|
|
3862
3868
|
}
|
|
3863
|
-
var _t$dataMatch5 = t.dataMatch(oldMapLines, newMapLines,
|
|
3869
|
+
var _t$dataMatch5 = t.dataMatch(oldMapLines, newMapLines, "id"),
|
|
3864
3870
|
_deletedDataIDs4 = _t$dataMatch5.deletedDataIDs,
|
|
3865
3871
|
_addedData4 = _t$dataMatch5.addedData,
|
|
3866
3872
|
_updatedData4 = _t$dataMatch5.updatedData;
|
|
@@ -3876,7 +3882,7 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
3876
3882
|
try {
|
|
3877
3883
|
for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
|
|
3878
3884
|
var _id4 = _step4.value;
|
|
3879
|
-
t.removeGraphic(_id4,
|
|
3885
|
+
t.removeGraphic(_id4, "line");
|
|
3880
3886
|
}
|
|
3881
3887
|
//增加
|
|
3882
3888
|
} catch (err) {
|
|
@@ -3890,7 +3896,7 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
3890
3896
|
}
|
|
3891
3897
|
//画其他特例线专用
|
|
3892
3898
|
if (customizedBoundary instanceof Array && props.customizedBoundary instanceof Array && !t.deepEqual(customizedBoundary, props.customizedBoundary)) {
|
|
3893
|
-
var _t$dataMatch6 = t.dataMatch(props.customizedBoundary, customizedBoundary,
|
|
3899
|
+
var _t$dataMatch6 = t.dataMatch(props.customizedBoundary, customizedBoundary, "id"),
|
|
3894
3900
|
_deletedDataIDs5 = _t$dataMatch6.deletedDataIDs,
|
|
3895
3901
|
_addedData5 = _t$dataMatch6.addedData,
|
|
3896
3902
|
_updatedData5 = _t$dataMatch6.updatedData;
|
|
@@ -3900,7 +3906,7 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
3900
3906
|
try {
|
|
3901
3907
|
for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
|
|
3902
3908
|
var _id5 = _step5.value;
|
|
3903
|
-
t.removeGraphic(_id5,
|
|
3909
|
+
t.removeGraphic(_id5, "line");
|
|
3904
3910
|
}
|
|
3905
3911
|
} catch (err) {
|
|
3906
3912
|
_iterator5.e(err);
|
|
@@ -3915,39 +3921,39 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
3915
3921
|
t.heatMapOverlay(heatMapData);
|
|
3916
3922
|
}
|
|
3917
3923
|
//图元编辑调用
|
|
3918
|
-
if (typeof isDoEdit ==
|
|
3924
|
+
if (typeof isDoEdit == "boolean" && isDoEdit || isDoEdit && isDoEdit !== t.props.isDoEdit) {
|
|
3919
3925
|
t.doEdit(editGraphicId);
|
|
3920
3926
|
}
|
|
3921
3927
|
//关闭图元编辑
|
|
3922
|
-
if (typeof isEndEdit ==
|
|
3928
|
+
if (typeof isEndEdit == "boolean" && isEndEdit || isEndEdit && isEndEdit !== t.props.isEndEdit) {
|
|
3923
3929
|
t.endEdit();
|
|
3924
3930
|
}
|
|
3925
3931
|
//开启图元绘制
|
|
3926
|
-
if (typeof isDraw ==
|
|
3932
|
+
if (typeof isDraw == "boolean" && isDraw || isDraw && isDraw !== t.props.isDraw) {
|
|
3927
3933
|
t.draw(mapDraw);
|
|
3928
3934
|
}
|
|
3929
3935
|
//关闭图元绘制
|
|
3930
|
-
if (typeof isCloseDraw ==
|
|
3936
|
+
if (typeof isCloseDraw == "boolean" && isCloseDraw || isCloseDraw && isCloseDraw !== t.props.isCloseDraw) {
|
|
3931
3937
|
t.closeDraw();
|
|
3932
3938
|
}
|
|
3933
3939
|
//设置中心点
|
|
3934
|
-
if (typeof setCenter ==
|
|
3940
|
+
if (typeof setCenter == "boolean" && setCenter || setCenter && setCenter !== t.props.setCenter) {
|
|
3935
3941
|
t.setCenter(mapCenter);
|
|
3936
3942
|
}
|
|
3937
3943
|
//设置点聚合
|
|
3938
|
-
if (typeof setCluster ==
|
|
3944
|
+
if (typeof setCluster == "boolean" && setCluster || setCluster && setCluster !== t.props.setCluster) {
|
|
3939
3945
|
t.cluster(mapCluster);
|
|
3940
3946
|
}
|
|
3941
3947
|
//设置比例尺
|
|
3942
|
-
if (typeof setZoomLevel ==
|
|
3948
|
+
if (typeof setZoomLevel == "boolean" && setZoomLevel || setZoomLevel && setZoomLevel !== t.props.setZoomLevel) {
|
|
3943
3949
|
t.setZoomLevel(mapZoomLevel);
|
|
3944
3950
|
}
|
|
3945
3951
|
/*设置指定图元展示*/
|
|
3946
|
-
if (typeof setVisiblePoints ==
|
|
3952
|
+
if (typeof setVisiblePoints == "boolean" && setVisiblePoints || setVisiblePoints && setVisiblePoints !== t.props.setVisiblePoints) {
|
|
3947
3953
|
t.setVisiblePoints(mapVisiblePoints);
|
|
3948
3954
|
}
|
|
3949
3955
|
//测距工具调用
|
|
3950
|
-
if (typeof isRangingTool ==
|
|
3956
|
+
if (typeof isRangingTool == "boolean" && isRangingTool || isRangingTool && isRangingTool !== t.props.isRangingTool) {
|
|
3951
3957
|
t.vtxRangingTool(mapRangingTool);
|
|
3952
3958
|
}
|
|
3953
3959
|
//开关路况
|
|
@@ -3957,11 +3963,11 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
3957
3963
|
t.hideTrafficInfo();
|
|
3958
3964
|
}
|
|
3959
3965
|
//清空地图
|
|
3960
|
-
if (typeof isClearAll ==
|
|
3966
|
+
if (typeof isClearAll == "boolean" && isClearAll || isClearAll && isClearAll !== t.props.isClearAll) {
|
|
3961
3967
|
t.clearAll();
|
|
3962
3968
|
}
|
|
3963
3969
|
//删除指定图元
|
|
3964
|
-
if (typeof isRemove ==
|
|
3970
|
+
if (typeof isRemove == "boolean" && isRemove || isRemove && isRemove !== t.props.isRemove) {
|
|
3965
3971
|
mapRemove.map(function (item, index) {
|
|
3966
3972
|
t.removeGraphic(item.id, item.type);
|
|
3967
3973
|
});
|
|
@@ -3991,7 +3997,6 @@ var Map = /*#__PURE__*/function (_React$Component) {
|
|
|
3991
3997
|
window.VtxMap[t.state.mapId] = null;
|
|
3992
3998
|
}
|
|
3993
3999
|
}]);
|
|
3994
|
-
|
|
3995
|
-
|
|
3996
|
-
|
|
3997
|
-
//# sourceMappingURL=Map.js.map
|
|
4000
|
+
return Map;
|
|
4001
|
+
}(_react.default.Component);
|
|
4002
|
+
var _default = exports.default = Map;
|