@vtx/map 1.2.29 → 1.2.31
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/lib/VtxMap/GMap/Map.js
CHANGED
|
@@ -91,6 +91,7 @@ var ArcgisMap = /*#__PURE__*/function (_React$Component) {
|
|
|
91
91
|
};
|
|
92
92
|
_this.rangingTools = {}; //测距点线缓存
|
|
93
93
|
_this.mapCreated = false;
|
|
94
|
+
_this.timer = null;
|
|
94
95
|
_this.state = {
|
|
95
96
|
gis: null,
|
|
96
97
|
//地图对象
|
|
@@ -493,10 +494,12 @@ var ArcgisMap = /*#__PURE__*/function (_React$Component) {
|
|
|
493
494
|
t.updatePointCollection(t.props.mapPointCollection);
|
|
494
495
|
}
|
|
495
496
|
//记录html图层位置
|
|
496
|
-
t.
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
497
|
+
if ($("#".concat(t.htmlPointsId)).css('left')) {
|
|
498
|
+
t.labelLayer = {
|
|
499
|
+
x: eval($("#".concat(t.htmlPointsId)).css('left').replace('px', '')),
|
|
500
|
+
y: eval($("#".concat(t.htmlPointsId)).css('top').replace('px', ''))
|
|
501
|
+
};
|
|
502
|
+
}
|
|
500
503
|
//html点位 根据地图移动和zoom计算位置
|
|
501
504
|
changeLabel();
|
|
502
505
|
//热力图重绘
|
|
@@ -2579,6 +2582,8 @@ var ArcgisMap = /*#__PURE__*/function (_React$Component) {
|
|
|
2579
2582
|
t.dealLabelGraphics(eid, label);
|
|
2580
2583
|
}
|
|
2581
2584
|
};
|
|
2585
|
+
console.log(t.editToolbar);
|
|
2586
|
+
|
|
2582
2587
|
/*点位编辑事件*/
|
|
2583
2588
|
//编辑关闭事件
|
|
2584
2589
|
t.editToolbar.on('deactivate', function (e) {
|
|
@@ -2621,7 +2626,13 @@ var ArcgisMap = /*#__PURE__*/function (_React$Component) {
|
|
|
2621
2626
|
break;
|
|
2622
2627
|
}
|
|
2623
2628
|
}
|
|
2624
|
-
t.
|
|
2629
|
+
if (t.timer) {
|
|
2630
|
+
clearTimeout(t.timer);
|
|
2631
|
+
}
|
|
2632
|
+
t.timer = setTimeout(function () {
|
|
2633
|
+
t.props.editGraphicChange(obj);
|
|
2634
|
+
t.timer = null;
|
|
2635
|
+
}, 500);
|
|
2625
2636
|
}
|
|
2626
2637
|
if (eid == 'vtx-circleMove') {
|
|
2627
2638
|
t.removeGraphic('vtx-circleMove', 'point');
|
|
@@ -3435,7 +3446,7 @@ var ArcgisMap = /*#__PURE__*/function (_React$Component) {
|
|
|
3435
3446
|
value: function calculateDistance(ps) {
|
|
3436
3447
|
var t = this,
|
|
3437
3448
|
totalDistance = 0;
|
|
3438
|
-
if (ps.length < 0) {
|
|
3449
|
+
if (!ps || ps.length < 0) {
|
|
3439
3450
|
return 0;
|
|
3440
3451
|
}
|
|
3441
3452
|
for (var i = 0; i < ps.length; i++) {
|