@vtx/map 1.1.14 → 1.1.15
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/OMap/Map.js +43 -43
- package/lib/VtxMap/OMap/Map.js.map +1 -1
- package/lib/VtxMap/OMap/Map.less +70 -70
- package/lib/VtxMap/OlMap/Map.js +39 -36
- package/lib/VtxMap/OlMap/Map.js.map +1 -1
- package/lib/VtxMap/OlMap/Map.less +164 -164
- package/lib/VtxMap/TMap/TMap.js +18 -18
- package/lib/VtxMap/TMap/TMap.js.map +1 -1
- package/lib/VtxSearchMap/index.js.map +1 -1
- package/lib/VtxSearchMap/mapping.js.map +1 -1
- package/package.json +1 -1
package/lib/VtxMap/OMap/Map.less
CHANGED
|
@@ -1,70 +1,70 @@
|
|
|
1
|
-
.label-content{
|
|
2
|
-
display: inline-block;
|
|
3
|
-
padding: 5px;
|
|
4
|
-
line-height: 22px;
|
|
5
|
-
text-align: center;
|
|
6
|
-
border-radius: 5px;
|
|
7
|
-
background-color: #fff;
|
|
8
|
-
opacity: 1;
|
|
9
|
-
color: #5DD0EE;
|
|
10
|
-
transform: translate(-50%);
|
|
11
|
-
-ms-transform: translate(-50%);
|
|
12
|
-
}
|
|
13
|
-
.noselect {
|
|
14
|
-
-webkit-touch-callout: none; /* iOS Safari */
|
|
15
|
-
-webkit-user-select: none; /* Chrome/Safari/Opera */
|
|
16
|
-
-khtml-user-select: none; /* Konqueror */
|
|
17
|
-
-moz-user-select: none; /* Firefox */
|
|
18
|
-
-ms-user-select: none; /* Internet Explorer/Edge */
|
|
19
|
-
user-select: none; /* Non-prefixed version, currently
|
|
20
|
-
not supported by any browser */
|
|
21
|
-
}
|
|
22
|
-
.vtx_gmap_html_pointCollection_a{
|
|
23
|
-
position: absolute;
|
|
24
|
-
canvas{
|
|
25
|
-
z-index: 111;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
.vtx-g-rangingPoint{
|
|
29
|
-
width: 8px;
|
|
30
|
-
height: 8px;
|
|
31
|
-
background-color: #fff;
|
|
32
|
-
border: 2px solid #108ee9;
|
|
33
|
-
display: inline-block;
|
|
34
|
-
border-radius: 8px;
|
|
35
|
-
position: relative;
|
|
36
|
-
top: 5px;
|
|
37
|
-
left: 1px;
|
|
38
|
-
}
|
|
39
|
-
.vtx-g-rangingDistance{
|
|
40
|
-
position: relative;
|
|
41
|
-
top: -36px;
|
|
42
|
-
left: 15px;
|
|
43
|
-
height: 30px;
|
|
44
|
-
line-height: 28px;
|
|
45
|
-
background-color: #fff;
|
|
46
|
-
border: 1px solid #108ee9;
|
|
47
|
-
font-size: 12px;
|
|
48
|
-
word-break: keep-all;
|
|
49
|
-
padding: 0px 3px;
|
|
50
|
-
color: #108ee9;
|
|
51
|
-
}
|
|
52
|
-
.vtx-g-rang-exit{
|
|
53
|
-
width: 12px;
|
|
54
|
-
height: 12px;
|
|
55
|
-
background-color: #fff;
|
|
56
|
-
border: 2px solid #108ee9;
|
|
57
|
-
color: #108ee9;
|
|
58
|
-
line-height: 7px;
|
|
59
|
-
text-align: center;
|
|
60
|
-
font-size: 12px;
|
|
61
|
-
cursor: pointer;
|
|
62
|
-
}
|
|
63
|
-
.vtx-g-rang-showRangTool{
|
|
64
|
-
line-height: 18px;
|
|
65
|
-
font-size: 12px;
|
|
66
|
-
border: 1px solid #108ee9;
|
|
67
|
-
word-break: keep-all;
|
|
68
|
-
background-color: #fff;
|
|
69
|
-
padding: 0px 5px;
|
|
70
|
-
}
|
|
1
|
+
.label-content{
|
|
2
|
+
display: inline-block;
|
|
3
|
+
padding: 5px;
|
|
4
|
+
line-height: 22px;
|
|
5
|
+
text-align: center;
|
|
6
|
+
border-radius: 5px;
|
|
7
|
+
background-color: #fff;
|
|
8
|
+
opacity: 1;
|
|
9
|
+
color: #5DD0EE;
|
|
10
|
+
transform: translate(-50%);
|
|
11
|
+
-ms-transform: translate(-50%);
|
|
12
|
+
}
|
|
13
|
+
.noselect {
|
|
14
|
+
-webkit-touch-callout: none; /* iOS Safari */
|
|
15
|
+
-webkit-user-select: none; /* Chrome/Safari/Opera */
|
|
16
|
+
-khtml-user-select: none; /* Konqueror */
|
|
17
|
+
-moz-user-select: none; /* Firefox */
|
|
18
|
+
-ms-user-select: none; /* Internet Explorer/Edge */
|
|
19
|
+
user-select: none; /* Non-prefixed version, currently
|
|
20
|
+
not supported by any browser */
|
|
21
|
+
}
|
|
22
|
+
.vtx_gmap_html_pointCollection_a{
|
|
23
|
+
position: absolute;
|
|
24
|
+
canvas{
|
|
25
|
+
z-index: 111;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
.vtx-g-rangingPoint{
|
|
29
|
+
width: 8px;
|
|
30
|
+
height: 8px;
|
|
31
|
+
background-color: #fff;
|
|
32
|
+
border: 2px solid #108ee9;
|
|
33
|
+
display: inline-block;
|
|
34
|
+
border-radius: 8px;
|
|
35
|
+
position: relative;
|
|
36
|
+
top: 5px;
|
|
37
|
+
left: 1px;
|
|
38
|
+
}
|
|
39
|
+
.vtx-g-rangingDistance{
|
|
40
|
+
position: relative;
|
|
41
|
+
top: -36px;
|
|
42
|
+
left: 15px;
|
|
43
|
+
height: 30px;
|
|
44
|
+
line-height: 28px;
|
|
45
|
+
background-color: #fff;
|
|
46
|
+
border: 1px solid #108ee9;
|
|
47
|
+
font-size: 12px;
|
|
48
|
+
word-break: keep-all;
|
|
49
|
+
padding: 0px 3px;
|
|
50
|
+
color: #108ee9;
|
|
51
|
+
}
|
|
52
|
+
.vtx-g-rang-exit{
|
|
53
|
+
width: 12px;
|
|
54
|
+
height: 12px;
|
|
55
|
+
background-color: #fff;
|
|
56
|
+
border: 2px solid #108ee9;
|
|
57
|
+
color: #108ee9;
|
|
58
|
+
line-height: 7px;
|
|
59
|
+
text-align: center;
|
|
60
|
+
font-size: 12px;
|
|
61
|
+
cursor: pointer;
|
|
62
|
+
}
|
|
63
|
+
.vtx-g-rang-showRangTool{
|
|
64
|
+
line-height: 18px;
|
|
65
|
+
font-size: 12px;
|
|
66
|
+
border: 1px solid #108ee9;
|
|
67
|
+
word-break: keep-all;
|
|
68
|
+
background-color: #fff;
|
|
69
|
+
padding: 0px 5px;
|
|
70
|
+
}
|
package/lib/VtxMap/OlMap/Map.js
CHANGED
|
@@ -446,13 +446,15 @@ var OlMap = /*#__PURE__*/function (_React$Component) {
|
|
|
446
446
|
|
|
447
447
|
if (!projection) {
|
|
448
448
|
projection = 'EPSG:4326';
|
|
449
|
-
}
|
|
449
|
+
} //中心点
|
|
450
|
+
|
|
450
451
|
|
|
452
|
+
var center = mapCenter && mapCenter instanceof Array && mapCenter.length == 2 ? mapCenter : [116.400433, 39.906705];
|
|
453
|
+
center = [parseFloat(center[0]), parseFloat(center[1])];
|
|
451
454
|
window.VtxMap[mapId] = t.state.gis = new ol.Map({
|
|
452
455
|
target: mapId.toString(),
|
|
453
456
|
view: new ol.View({
|
|
454
|
-
center:
|
|
455
|
-
//中心点
|
|
457
|
+
center: center,
|
|
456
458
|
zoom: mapZoomLevel || 10,
|
|
457
459
|
projection: projection,
|
|
458
460
|
minZoom: minZoom,
|
|
@@ -466,8 +468,7 @@ var OlMap = /*#__PURE__*/function (_React$Component) {
|
|
|
466
468
|
}); // 基本地图视图
|
|
467
469
|
|
|
468
470
|
t.viewer = new ol.View({
|
|
469
|
-
center:
|
|
470
|
-
//中心点
|
|
471
|
+
center: center,
|
|
471
472
|
zoom: mapZoomLevel || 10,
|
|
472
473
|
projection: projection,
|
|
473
474
|
minZoom: minZoom,
|
|
@@ -952,6 +953,8 @@ var OlMap = /*#__PURE__*/function (_React$Component) {
|
|
|
952
953
|
lng = _gc$flatCoordinates[0],
|
|
953
954
|
lat = _gc$flatCoordinates[1];
|
|
954
955
|
|
|
956
|
+
gc.x = lng;
|
|
957
|
+
gc.y = lat;
|
|
955
958
|
t.addPoint([{
|
|
956
959
|
id: t.drawParam.data.id,
|
|
957
960
|
longitude: lng,
|
|
@@ -1372,10 +1375,10 @@ var OlMap = /*#__PURE__*/function (_React$Component) {
|
|
|
1372
1375
|
}
|
|
1373
1376
|
} //将制定图元展示在视野内 (强制改变地图中心位置)
|
|
1374
1377
|
|
|
1375
|
-
/*
|
|
1376
|
-
参数arg格式如下1,2
|
|
1377
|
-
1.string 格式如:'1,a,2,3,4'
|
|
1378
|
-
2.数组 ['1','2']
|
|
1378
|
+
/*
|
|
1379
|
+
参数arg格式如下1,2
|
|
1380
|
+
1.string 格式如:'1,a,2,3,4'
|
|
1381
|
+
2.数组 ['1','2']
|
|
1379
1382
|
*/
|
|
1380
1383
|
|
|
1381
1384
|
}, {
|
|
@@ -1698,12 +1701,12 @@ var OlMap = /*#__PURE__*/function (_React$Component) {
|
|
|
1698
1701
|
item.value.clear();
|
|
1699
1702
|
});
|
|
1700
1703
|
}
|
|
1701
|
-
/*
|
|
1702
|
-
* 添加信息窗口
|
|
1703
|
-
* params
|
|
1704
|
-
* @position: Array[longitude,latitude]
|
|
1705
|
-
* @content: String|HTML
|
|
1706
|
-
* @close: boolean
|
|
1704
|
+
/*
|
|
1705
|
+
* 添加信息窗口
|
|
1706
|
+
* params
|
|
1707
|
+
* @position: Array[longitude,latitude]
|
|
1708
|
+
* @content: String|HTML
|
|
1709
|
+
* @close: boolean
|
|
1707
1710
|
*/
|
|
1708
1711
|
|
|
1709
1712
|
}, {
|
|
@@ -1761,7 +1764,7 @@ var OlMap = /*#__PURE__*/function (_React$Component) {
|
|
|
1761
1764
|
|
|
1762
1765
|
|
|
1763
1766
|
var feature = new ol.Feature({
|
|
1764
|
-
geometry: new ol.geom.Point([item.longitude, item.latitude]),
|
|
1767
|
+
geometry: new ol.geom.Point([parseFloat(item.longitude), parseFloat(item.latitude)]),
|
|
1765
1768
|
name: item.name,
|
|
1766
1769
|
id: item.id,
|
|
1767
1770
|
params: _objectSpread({}, item)
|
|
@@ -1792,7 +1795,7 @@ var OlMap = /*#__PURE__*/function (_React$Component) {
|
|
|
1792
1795
|
|
|
1793
1796
|
var pop = new ol.Overlay({
|
|
1794
1797
|
id: item.id,
|
|
1795
|
-
position: [item.longitude, item.latitude],
|
|
1798
|
+
position: [parseFloat(item.longitude), parseFloat(item.latitude)],
|
|
1796
1799
|
positioning: 'center-center',
|
|
1797
1800
|
element: nodes,
|
|
1798
1801
|
autoPanMargin: 20,
|
|
@@ -1897,8 +1900,8 @@ var OlMap = /*#__PURE__*/function (_React$Component) {
|
|
|
1897
1900
|
geometryType: 'point',
|
|
1898
1901
|
geometry: {
|
|
1899
1902
|
type: 'point',
|
|
1900
|
-
x: item.longitude,
|
|
1901
|
-
y: item.latitude
|
|
1903
|
+
x: parseFloat(item.longitude),
|
|
1904
|
+
y: parseFloat(item.latitude)
|
|
1902
1905
|
},
|
|
1903
1906
|
source: source
|
|
1904
1907
|
});
|
|
@@ -1955,7 +1958,7 @@ var OlMap = /*#__PURE__*/function (_React$Component) {
|
|
|
1955
1958
|
var overlay = t.state.gis.getOverlayById(item.id);
|
|
1956
1959
|
var nodes = t.parseDom(item.markerContent)[0];
|
|
1957
1960
|
overlay.setElement(nodes);
|
|
1958
|
-
overlay.setPosition([item.longitude, item.latitude]);
|
|
1961
|
+
overlay.setPosition([parseFloat(item.longitude), parseFloat(item.latitude)]);
|
|
1959
1962
|
t.state.gis.changed();
|
|
1960
1963
|
} else {
|
|
1961
1964
|
canvasDataURL(item.url || require("../images/defaultMarker.png"), {
|
|
@@ -2014,7 +2017,7 @@ var OlMap = /*#__PURE__*/function (_React$Component) {
|
|
|
2014
2017
|
}
|
|
2015
2018
|
}
|
|
2016
2019
|
|
|
2017
|
-
gc.setGeometry(new ol.geom.Point([item.longitude, item.latitude]));
|
|
2020
|
+
gc.setGeometry(new ol.geom.Point([parseFloat(item.longitude), parseFloat(item.latitude)]));
|
|
2018
2021
|
|
|
2019
2022
|
_this3.GM.setGraphicParam(item.id, {
|
|
2020
2023
|
attributes: _objectSpread(_objectSpread({}, item), {}, {
|
|
@@ -2023,8 +2026,8 @@ var OlMap = /*#__PURE__*/function (_React$Component) {
|
|
|
2023
2026
|
geometryType: 'point',
|
|
2024
2027
|
geometry: {
|
|
2025
2028
|
type: 'point',
|
|
2026
|
-
x: item.longitude,
|
|
2027
|
-
y: item.latitude
|
|
2029
|
+
x: parseFloat(item.longitude),
|
|
2030
|
+
y: parseFloat(item.latitude)
|
|
2028
2031
|
},
|
|
2029
2032
|
source: gp.source
|
|
2030
2033
|
});
|
|
@@ -3480,10 +3483,10 @@ var OlMap = /*#__PURE__*/function (_React$Component) {
|
|
|
3480
3483
|
isClearAll = nextProps.isClearAll; // 等待地图加载
|
|
3481
3484
|
|
|
3482
3485
|
if (!t.state.mapCreated) return;
|
|
3483
|
-
/*点数据处理
|
|
3484
|
-
pointData[2]相同的点,执行刷新
|
|
3485
|
-
pointData[1]的数据在idsForGraphicId中不存在的,执行新增
|
|
3486
|
-
pointData[0]数据中多余的id,执行删除
|
|
3486
|
+
/*点数据处理
|
|
3487
|
+
pointData[2]相同的点,执行刷新
|
|
3488
|
+
pointData[1]的数据在idsForGraphicId中不存在的,执行新增
|
|
3489
|
+
pointData[0]数据中多余的id,执行删除
|
|
3487
3490
|
*/
|
|
3488
3491
|
|
|
3489
3492
|
if (mapPoints instanceof Array && t.props.mapPoints instanceof Array && !t.deepEqual(mapPoints, t.props.mapPoints)) {
|
|
@@ -3532,9 +3535,9 @@ var OlMap = /*#__PURE__*/function (_React$Component) {
|
|
|
3532
3535
|
|
|
3533
3536
|
t.updatePoint([].concat(_toConsumableArray(upds), _toConsumableArray(otherupds)));
|
|
3534
3537
|
}
|
|
3535
|
-
/*
|
|
3536
|
-
线数据处理
|
|
3537
|
-
先全删除,再新增
|
|
3538
|
+
/*
|
|
3539
|
+
线数据处理
|
|
3540
|
+
先全删除,再新增
|
|
3538
3541
|
*/
|
|
3539
3542
|
|
|
3540
3543
|
|
|
@@ -3584,9 +3587,9 @@ var OlMap = /*#__PURE__*/function (_React$Component) {
|
|
|
3584
3587
|
|
|
3585
3588
|
t.updateLine([].concat(_toConsumableArray(_upds), _toConsumableArray(_otherupds)));
|
|
3586
3589
|
}
|
|
3587
|
-
/*
|
|
3588
|
-
面数据处理
|
|
3589
|
-
先全删除,再新增
|
|
3590
|
+
/*
|
|
3591
|
+
面数据处理
|
|
3592
|
+
先全删除,再新增
|
|
3590
3593
|
*/
|
|
3591
3594
|
|
|
3592
3595
|
|
|
@@ -3636,9 +3639,9 @@ var OlMap = /*#__PURE__*/function (_React$Component) {
|
|
|
3636
3639
|
|
|
3637
3640
|
t.updatePolygon([].concat(_toConsumableArray(_upds2), _toConsumableArray(_otherupds2)));
|
|
3638
3641
|
}
|
|
3639
|
-
/*
|
|
3640
|
-
圆数据处理
|
|
3641
|
-
先全删除,再新增
|
|
3642
|
+
/*
|
|
3643
|
+
圆数据处理
|
|
3644
|
+
先全删除,再新增
|
|
3642
3645
|
*/
|
|
3643
3646
|
|
|
3644
3647
|
|