@vtx/map 1.1.2 → 1.1.4
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/Map.js +6 -0
- package/lib/VtxMap/OlMap/Map.css +123 -0
- package/lib/VtxMap/OlMap/Map.js +3255 -0
- package/lib/VtxMap/OlMap/Map.less +122 -0
- package/lib/VtxSearchMap/VtxSearchMap.js +14 -7
- package/lib/default.js +3 -1
- package/package.json +1 -1
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
.map{
|
|
2
|
+
width: 100%;
|
|
3
|
+
height: 100%;
|
|
4
|
+
background-color: #f1f1f1;
|
|
5
|
+
}
|
|
6
|
+
.vtx_gmap_html_points,.vtx_gmap_html_pointCollection{
|
|
7
|
+
position: absolute;
|
|
8
|
+
top: 0px;
|
|
9
|
+
left: 0px;
|
|
10
|
+
}
|
|
11
|
+
.esriSimpleSlider{
|
|
12
|
+
z-index: 10000000 !important;
|
|
13
|
+
}
|
|
14
|
+
.label-content{
|
|
15
|
+
/*margin-left: 0;
|
|
16
|
+
width: 100px;
|
|
17
|
+
line-height: 25px;
|
|
18
|
+
text-align: center;
|
|
19
|
+
position: relative;
|
|
20
|
+
left: -43px;
|
|
21
|
+
background-color: #fff;
|
|
22
|
+
opacity: 1;
|
|
23
|
+
border-radius: 5px;
|
|
24
|
+
color: #5DD0EE;
|
|
25
|
+
word-break: break-all;
|
|
26
|
+
white-space: normal;
|
|
27
|
+
padding: 2px 8px;*/
|
|
28
|
+
display: inline-block;
|
|
29
|
+
padding: 5px;
|
|
30
|
+
line-height: 22px;
|
|
31
|
+
text-align: center;
|
|
32
|
+
border-radius: 5px;
|
|
33
|
+
background-color: #fff;
|
|
34
|
+
opacity: 1;
|
|
35
|
+
color: #5DD0EE;
|
|
36
|
+
}
|
|
37
|
+
.vtx-g-rangingPoint{
|
|
38
|
+
width: 7px;
|
|
39
|
+
height: 7px;
|
|
40
|
+
background-color: #fff;
|
|
41
|
+
border: 2px solid #ff0000;
|
|
42
|
+
display: inline-block;
|
|
43
|
+
border-radius: 7px;
|
|
44
|
+
}
|
|
45
|
+
.vtx-g-rangingDistance{
|
|
46
|
+
position: relative;
|
|
47
|
+
top: -36px;
|
|
48
|
+
left: 15px;
|
|
49
|
+
height: 30px;
|
|
50
|
+
line-height: 28px;
|
|
51
|
+
background-color: #fff;
|
|
52
|
+
border: 1px solid #ff0000;
|
|
53
|
+
font-size: 12px;
|
|
54
|
+
word-break: keep-all;
|
|
55
|
+
padding: 0px 3px;
|
|
56
|
+
}
|
|
57
|
+
.vtx-g-rang-exit{
|
|
58
|
+
width: 9px;
|
|
59
|
+
height: 9px;
|
|
60
|
+
background-color: #fff;
|
|
61
|
+
border: 2px solid #ff0000;
|
|
62
|
+
color: #ff0000;
|
|
63
|
+
line-height: 7px;
|
|
64
|
+
text-align: center;
|
|
65
|
+
font-size: 12px;
|
|
66
|
+
cursor: pointer;
|
|
67
|
+
}
|
|
68
|
+
.vtx-g-rang-showRangTool{
|
|
69
|
+
line-height: 18px;
|
|
70
|
+
font-size: 12px;
|
|
71
|
+
border: 1px solid #ff0000;
|
|
72
|
+
word-break: keep-all;
|
|
73
|
+
background-color: #fff;
|
|
74
|
+
padding: 0px 5px;
|
|
75
|
+
}
|
|
76
|
+
.zoom_slider_show_scale{
|
|
77
|
+
padding: 1px 8px;
|
|
78
|
+
font-size: 12px;
|
|
79
|
+
text-align: center;
|
|
80
|
+
}
|
|
81
|
+
.zoom_slider_show_bottom{
|
|
82
|
+
width: 100%;
|
|
83
|
+
height: 3px;
|
|
84
|
+
border: 1px solid #000;
|
|
85
|
+
border-bottom: 3px solid #000;
|
|
86
|
+
border-top: 0px;
|
|
87
|
+
}
|
|
88
|
+
.ol-tooltip {
|
|
89
|
+
position: relative;
|
|
90
|
+
background: rgba(0, 0, 0, 0.5);
|
|
91
|
+
border-radius: 4px;
|
|
92
|
+
color: white;
|
|
93
|
+
padding: 4px 8px;
|
|
94
|
+
opacity: 0.7;
|
|
95
|
+
white-space: nowrap;
|
|
96
|
+
font-size: 12px;
|
|
97
|
+
cursor: default;
|
|
98
|
+
user-select: none;
|
|
99
|
+
}
|
|
100
|
+
.ol-tooltip-measure {
|
|
101
|
+
opacity: 1;
|
|
102
|
+
font-weight: bold;
|
|
103
|
+
}
|
|
104
|
+
.ol-tooltip-static {
|
|
105
|
+
background-color: #ffcc33;
|
|
106
|
+
color: black;
|
|
107
|
+
border: 1px solid white;
|
|
108
|
+
}
|
|
109
|
+
.ol-tooltip-measure:before,
|
|
110
|
+
.ol-tooltip-static:before {
|
|
111
|
+
border-top: 6px solid rgba(0, 0, 0, 0.5);
|
|
112
|
+
border-right: 6px solid transparent;
|
|
113
|
+
border-left: 6px solid transparent;
|
|
114
|
+
content: "";
|
|
115
|
+
position: absolute;
|
|
116
|
+
bottom: -6px;
|
|
117
|
+
margin-left: -7px;
|
|
118
|
+
left: 50%;
|
|
119
|
+
}
|
|
120
|
+
.ol-tooltip-static:before {
|
|
121
|
+
border-top-color: #ffcc33;
|
|
122
|
+
}
|
|
@@ -161,7 +161,9 @@ var VtxSearchMap = function (_React$Component) {
|
|
|
161
161
|
modal1Visible: props.modal1Visible || false,
|
|
162
162
|
isShowOther: props.isShowOther || false,
|
|
163
163
|
otherText: props.otherText || '显示服务区域',
|
|
164
|
-
isShowOtherGraph: props.isShowOther || false
|
|
164
|
+
isShowOtherGraph: props.isShowOther || false,
|
|
165
|
+
// openlayer
|
|
166
|
+
olProps: props.olProps
|
|
165
167
|
};
|
|
166
168
|
return _this;
|
|
167
169
|
}
|
|
@@ -503,7 +505,8 @@ var VtxSearchMap = function (_React$Component) {
|
|
|
503
505
|
otherText = _state2.otherText,
|
|
504
506
|
isShowOtherGraph = _state2.isShowOtherGraph,
|
|
505
507
|
editGraphic = _state2.editGraphic,
|
|
506
|
-
graphicType = _state2.graphicType
|
|
508
|
+
graphicType = _state2.graphicType,
|
|
509
|
+
olProps = _state2.olProps;
|
|
507
510
|
|
|
508
511
|
var InputProps = {
|
|
509
512
|
style: { 'width': '200px' },
|
|
@@ -632,7 +635,7 @@ var VtxSearchMap = function (_React$Component) {
|
|
|
632
635
|
_react2.default.createElement(
|
|
633
636
|
'div',
|
|
634
637
|
{ className: styles.top },
|
|
635
|
-
mapType == 'gmap' ? '' : [_react2.default.createElement(_input2.default, _extends({ key: '1' }, InputProps)), _react2.default.createElement(
|
|
638
|
+
mapType == 'gmap' || mapType == 'olmap' ? '' : [_react2.default.createElement(_input2.default, _extends({ key: '1' }, InputProps)), _react2.default.createElement(
|
|
636
639
|
_button2.default,
|
|
637
640
|
{ key: '2', type: 'primary', onClick: this.searchList.bind(this), icon: getIcon('search') },
|
|
638
641
|
'\u67E5\u8BE2'
|
|
@@ -665,7 +668,7 @@ var VtxSearchMap = function (_React$Component) {
|
|
|
665
668
|
}, icon: getIcon('edit') },
|
|
666
669
|
'\u91CD\u65B0\u7ED8\u5236'
|
|
667
670
|
) : null,
|
|
668
|
-
mapType == 'gmap' ? '' : _react2.default.createElement(
|
|
671
|
+
mapType == 'gmap' || mapType == 'olmap' ? '' : _react2.default.createElement(
|
|
669
672
|
_button2.default,
|
|
670
673
|
{ onClick: this.setFitView.bind(this), icon: getIcon('sync') },
|
|
671
674
|
'\u8FD4\u56DE\u5168\u5C40\u5730\u56FE'
|
|
@@ -684,8 +687,8 @@ var VtxSearchMap = function (_React$Component) {
|
|
|
684
687
|
),
|
|
685
688
|
_react2.default.createElement(
|
|
686
689
|
'div',
|
|
687
|
-
{ className: styles.content, style: { paddingLeft: mapType == 'gmap' ? '0px' : '25px' } },
|
|
688
|
-
mapType == 'gmap' ? '' : _react2.default.createElement(
|
|
690
|
+
{ className: styles.content, style: { paddingLeft: mapType == 'gmap' || mapType == 'olmap' ? '0px' : '25px' } },
|
|
691
|
+
mapType == 'gmap' || mapType == 'olmap' ? '' : _react2.default.createElement(
|
|
689
692
|
'div',
|
|
690
693
|
{ className: styles.content_left + ' ' + (isShowList ? styles.w_l : '') },
|
|
691
694
|
_react2.default.createElement(
|
|
@@ -764,7 +767,9 @@ var VtxSearchMap = function (_React$Component) {
|
|
|
764
767
|
clickMap: function clickMap() {
|
|
765
768
|
t.isClickMap = true;
|
|
766
769
|
}
|
|
767
|
-
}, drawProps
|
|
770
|
+
}, drawProps, {
|
|
771
|
+
olProps: olProps
|
|
772
|
+
}))
|
|
768
773
|
)
|
|
769
774
|
)
|
|
770
775
|
)
|
|
@@ -859,6 +864,8 @@ var VtxSearchMap = function (_React$Component) {
|
|
|
859
864
|
_this6.map.getGraphic('locationPoint').mapLayer.geometry.setLatitude(nextProps.mapCenter[1]);
|
|
860
865
|
_this6.map.getGraphic('locationPoint').mapLayer.geometry.setLongitude(nextProps.mapCenter[0]);
|
|
861
866
|
_this6.map.state.gis.graphics.refresh();
|
|
867
|
+
case 'olMap':
|
|
868
|
+
_this6.map.getGraphic('locationPoint').mapLayer.setGeometry(new ol.geom.Point(nextProps.mapCenter));
|
|
862
869
|
break;
|
|
863
870
|
}
|
|
864
871
|
}
|
package/lib/default.js
CHANGED
|
@@ -28,7 +28,9 @@ exports.default = {
|
|
|
28
28
|
//地图服务地址ip
|
|
29
29
|
mapServerURL: globalCfg.mapServerURL ? globalCfg.mapServerURL : '//vortexplugin.cloudhw.cn/mapplugin',
|
|
30
30
|
//arcgis地图服务ip
|
|
31
|
-
arcgisServerURL: globalCfg.arcgisServerURL ? globalCfg.arcgisServerURL : '//vortexplugin.cloudhw.cn/gis'
|
|
31
|
+
arcgisServerURL: globalCfg.arcgisServerURL ? globalCfg.arcgisServerURL : '//vortexplugin.cloudhw.cn/gis',
|
|
32
|
+
//openlayer地图服务ip
|
|
33
|
+
openlayerServerURL: globalCfg.openlayerServerURL ? globalCfg.openlayerServerURL : '//vortexplugin.cloudhw.cn/openlayer'
|
|
32
34
|
};
|
|
33
35
|
function getTMapTK() {
|
|
34
36
|
if (window.TMapTK) {
|