ry-vue-map 0.3.6 → 0.3.7
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 +1 -1
- package/lib/ryui.common.js +53 -44
- package/lib/ryui.common.js.gz +0 -0
- package/lib/ryui.css +1 -1
- package/lib/ryui.css.gz +0 -0
- package/lib/ryui.umd.js +53 -44
- package/lib/ryui.umd.js.gz +0 -0
- package/lib/ryui.umd.min.js +4 -4
- package/lib/ryui.umd.min.js.gz +0 -0
- package/package.json +1 -1
- package/src/components/maps/models/ryOfflineMap/view.js +1 -1
- package/src/components/maps/ryOfflineMap/src/index.vue +41 -28
- package/src/views/map/index.vue +3 -4
package/lib/ryui.umd.min.js.gz
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="map-box">
|
|
3
3
|
<div v-lmap:loadMap class="map-style"></div>
|
|
4
|
-
|
|
4
|
+
<RyMapTool class="ry-map-tool" :class="{
|
|
5
5
|
'left':!isRight,
|
|
6
6
|
'right':isRight
|
|
7
7
|
}" v-if="lMap.map && isRyMapTool" @crossHairClick="crossHairClick($event)" :lMap="lMap"
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
8
|
+
:isShowRangingTool="isShowRangingTool" :initModifyPolygon="initModifyPolygon"
|
|
9
|
+
:isShowDrawTool="isShowDrawTool" :isRight="isRight" :isCrossHair="isCrossHair" :hideAdd="hideAdd"
|
|
10
|
+
:hidePoint="hidePoint" :hideCancel="hideCancel" :hideDelete="hideDelete" :hideSave="hideSave"
|
|
11
|
+
:hideLine="hideLine" :hideArea="hideArea" :isSwitchMap="isSwitchMap" :isSwitchMapRight="isSwitchMapRight"
|
|
12
|
+
:gpsType="lastMapType" @loadDrawPolygonEvent="loadDrawPolygonEvent($event)" @success="drawSuccess($event)"
|
|
13
|
+
@error="drawError($event)">
|
|
14
|
+
<template>
|
|
15
|
+
<slot name="maptool"></slot>
|
|
16
|
+
</template>
|
|
17
|
+
</RyMapTool>
|
|
18
|
+
|
|
19
|
+
<template v-if="map">
|
|
20
|
+
<slot name="polygon" :mapDto="{map,lMap}">
|
|
21
|
+
|
|
22
|
+
</slot>
|
|
23
|
+
|
|
24
|
+
<slot name="marker" :mapDto="{map,lMap}">
|
|
25
|
+
|
|
26
|
+
</slot>
|
|
27
|
+
</template>
|
|
28
28
|
</div>
|
|
29
29
|
</template>
|
|
30
30
|
<script>
|
|
@@ -84,9 +84,9 @@
|
|
|
84
84
|
m(val) {
|
|
85
85
|
this.m = val;
|
|
86
86
|
},
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
87
|
+
boundaryModel(val) {
|
|
88
|
+
if (!this.map) return;
|
|
89
|
+
}
|
|
90
90
|
},
|
|
91
91
|
data() {
|
|
92
92
|
return {
|
|
@@ -114,17 +114,30 @@
|
|
|
114
114
|
async loadMap(el) {
|
|
115
115
|
this.lMap.initOfflineMap(100, {
|
|
116
116
|
el,
|
|
117
|
-
urls:this.urls,
|
|
117
|
+
urls: this.urls,
|
|
118
118
|
callback: ({
|
|
119
119
|
map,
|
|
120
120
|
lMap
|
|
121
121
|
}) => {
|
|
122
122
|
lMap.setView(this.center, this.bbox);
|
|
123
|
-
lMap.getView()
|
|
123
|
+
const _view = lMap.getView();
|
|
124
|
+
_view.fit(this.bbox, [
|
|
124
125
|
50, 50, 50, 50
|
|
125
126
|
]);
|
|
126
|
-
|
|
127
|
-
|
|
127
|
+
_view.setMaxZoom(this.minZoom);
|
|
128
|
+
_view.setMaxZoom(this.maxZoom);
|
|
129
|
+
// _view.seZoom(this.zoom);
|
|
130
|
+
const {
|
|
131
|
+
geo,
|
|
132
|
+
width,
|
|
133
|
+
color,
|
|
134
|
+
lineDash
|
|
135
|
+
} = this.boundaryModel;
|
|
136
|
+
lMap.initMapMaskEvent(map.getLayers(), geo, {
|
|
137
|
+
width,
|
|
138
|
+
color,
|
|
139
|
+
lineDash
|
|
140
|
+
});
|
|
128
141
|
}
|
|
129
142
|
});
|
|
130
143
|
},
|
package/src/views/map/index.vue
CHANGED
|
@@ -120,7 +120,8 @@
|
|
|
120
120
|
isShowPaly: true,
|
|
121
121
|
layerArr: [2, 2],
|
|
122
122
|
urls: [
|
|
123
|
-
`https://zjhzla.ryaims.com/overlay/330112/
|
|
123
|
+
`https://zjhzla.ryaims.com/overlay/330112/satellite/{z}/{x}/{y}.jpg`,
|
|
124
|
+
// `https://zjhzla.ryaims.com/overlay/330112/roadmap/{z}/{x}/{y}.png`,
|
|
124
125
|
// `http://127.0.0.1:10006/${330112}/overlay/{z}/{x}/{y}.png`
|
|
125
126
|
],
|
|
126
127
|
dto: null,
|
|
@@ -131,10 +132,8 @@
|
|
|
131
132
|
geo: geoJson,
|
|
132
133
|
width: 6,
|
|
133
134
|
color: '#00adfd',
|
|
134
|
-
lineDash: [1, 2, 3, 4, 5, 6,8,9,10],
|
|
135
|
-
|
|
135
|
+
lineDash: [1, 2, 3, 4, 5, 6, 8, 9, 10],
|
|
136
136
|
};
|
|
137
|
-
console.log(this.dto);
|
|
138
137
|
},
|
|
139
138
|
methods: {
|
|
140
139
|
onShowPaly(b) {
|