ry-vue-map 0.4.2 → 0.4.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/README.MD +1 -1
- package/lib/ryui.common.js +73 -71
- 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 +73 -71
- package/lib/ryui.umd.js.gz +0 -0
- package/lib/ryui.umd.min.js +3 -3
- package/lib/ryui.umd.min.js.gz +0 -0
- package/package.json +1 -1
- package/src/components/maps/ryMap/src/index.vue +1 -1
- package/src/components/maps/ryOfflineMap/src/index.vue +2 -2
- package/src/components/maps/ryStaticLayer/index.js +4 -4
- package/src/components/maps/ryStaticLayer/src/index.vue +1 -1
- package/src/components/maps/ryStaticLayers/index.js +4 -4
- package/src/views/map/index.vue +69 -25
package/lib/ryui.umd.min.js.gz
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import RyStaticLayer from './src/index';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
Vue.install(
|
|
3
|
+
RyStaticLayer.install = (Vue) => {
|
|
4
|
+
Vue.install(RyStaticLayer.name, RyStaticLayer);
|
|
5
5
|
};
|
|
6
6
|
|
|
7
|
-
export default
|
|
7
|
+
export default RyStaticLayer;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import RyStaticLayers from './src/index';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
Vue.install(
|
|
3
|
+
RyStaticLayers.install = (Vue) => {
|
|
4
|
+
Vue.install(RyStaticLayers.name, RyStaticLayers);
|
|
5
5
|
};
|
|
6
6
|
|
|
7
|
-
export default
|
|
7
|
+
export default RyStaticLayers;
|
package/src/views/map/index.vue
CHANGED
|
@@ -1,24 +1,31 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="map-style">
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
4
|
+
<ry-map :maxZoom="18" @load="loadMap($event)" :isShowSwitchMap="false" :layerType="2" :mapType="0">
|
|
5
|
+
<template #polygon="{ mapDto }">
|
|
6
|
+
<RyStaticLayer :map="mapDto.map" :model="model2">
|
|
7
|
+
|
|
8
|
+
</RyStaticLayer>
|
|
9
|
+
<RyStaticLayer :map="mapDto.map" :model="model">
|
|
10
|
+
|
|
11
|
+
</RyStaticLayer>
|
|
12
|
+
</template>
|
|
13
|
+
</ry-map>
|
|
14
|
+
|
|
15
|
+
<!-- <RyOfflineMap
|
|
16
|
+
class="ry-offline-map"
|
|
17
|
+
:urls="urls"
|
|
18
|
+
:center="[118.84146054770122, 29.935677496166022]"
|
|
19
|
+
:minZoom="1"
|
|
20
|
+
:maxZoom="18"
|
|
21
|
+
@load="load"
|
|
22
|
+
>
|
|
23
|
+
</RyOfflineMap> -->
|
|
17
24
|
|
|
18
25
|
<button @click="onClick()">测试</button>
|
|
19
26
|
<button @click="onClick2()">测试2</button>
|
|
20
27
|
<button @click="onClick3()">测试3</button>
|
|
21
|
-
|
|
28
|
+
|
|
22
29
|
<!-- <aside class="aside-style">
|
|
23
30
|
<el-button class="ele-text-primary" v-show="isShowPaly" style="padding:10px;"
|
|
24
31
|
@click.stop="onShowPaly(false)">
|
|
@@ -33,7 +40,9 @@
|
|
|
33
40
|
|
|
34
41
|
<script>
|
|
35
42
|
import dayjs from 'dayjs'
|
|
36
|
-
import
|
|
43
|
+
import RyMap from '@/components/maps/ryMap/src/index.vue';
|
|
44
|
+
import RyOfflineMap from '@/components/maps/ryOfflineMap/src/index.vue';
|
|
45
|
+
|
|
37
46
|
import RyMapTool from '@/components/maps/ryMapTool/src/index.vue';
|
|
38
47
|
import RyPolygon from '@/components/maps/ryPolygon/src/index.vue';
|
|
39
48
|
import RyPolygons from '@/components/maps/ryPolygons/src/index.vue';
|
|
@@ -42,19 +51,25 @@
|
|
|
42
51
|
import geoJson from "./330112";
|
|
43
52
|
import LineObj from './obj'
|
|
44
53
|
import RyLines from '@/components/maps/ryLines/src/index.vue';
|
|
45
|
-
|
|
54
|
+
import RyKML from '@/components/maps/ryKML/src/index.vue';
|
|
55
|
+
import RyStaticLayer from '@/components/maps/ryStaticLayer/src/index.vue';
|
|
46
56
|
export default {
|
|
47
57
|
components: {
|
|
48
|
-
|
|
58
|
+
RyMap,
|
|
49
59
|
RyMapTool,
|
|
50
60
|
RyPolygon,
|
|
51
61
|
RyPolygons,
|
|
52
62
|
RyClustersMarker,
|
|
53
63
|
RyPolygonGeo,
|
|
54
|
-
RyLines
|
|
64
|
+
RyLines,
|
|
65
|
+
RyKML,
|
|
66
|
+
RyStaticLayer,
|
|
67
|
+
RyOfflineMap
|
|
55
68
|
},
|
|
56
69
|
data() {
|
|
57
70
|
return {
|
|
71
|
+
// bbox:[119.5172307870407,30.20294858200727,119.4830523878688,30.17494943404726],
|
|
72
|
+
kmlDto:null,
|
|
58
73
|
map: null,
|
|
59
74
|
lMap: null,
|
|
60
75
|
polygonColorObj: null,
|
|
@@ -63,7 +78,7 @@
|
|
|
63
78
|
// const bbox = [ 118.84072600000002, 29.937127000000032, 119.86315600000012, 30.445895000000064 ];
|
|
64
79
|
// const center = [119.34667114000006, 30.198078622500038];
|
|
65
80
|
|
|
66
|
-
bbox: [118.84146054770122, 29.935677496166022, 119.86391954737257, 30.44823698639243],
|
|
81
|
+
// bbox: [118.84146054770122, 29.935677496166022, 119.86391954737257, 30.44823698639243],
|
|
67
82
|
isClear: false,
|
|
68
83
|
colors: [],
|
|
69
84
|
modelArr2: [{
|
|
@@ -106,7 +121,7 @@
|
|
|
106
121
|
polygonModel: null,
|
|
107
122
|
mapTool: null,
|
|
108
123
|
isCheckPoint: null,
|
|
109
|
-
gpsType:
|
|
124
|
+
gpsType: 1,
|
|
110
125
|
isRyMapTool: true,
|
|
111
126
|
maxZoom: 18,
|
|
112
127
|
lineData1: null,
|
|
@@ -129,11 +144,32 @@
|
|
|
129
144
|
lineAppend: [],
|
|
130
145
|
isShowPaly: true,
|
|
131
146
|
layerArr: [2, 2],
|
|
132
|
-
urls: [
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
147
|
+
// urls: [
|
|
148
|
+
// `https://zjhzla.ryaims.com/overlay/330112/satellite/{z}/{x}/{y}.jpg`,
|
|
149
|
+
// // `https://zjhzla.ryaims.com/overlay/330112/roadmap/{z}/{x}/{y}.png`,
|
|
150
|
+
// // `http://127.0.0.1:10006/${330112}/overlay/{z}/{x}/{y}.png`
|
|
151
|
+
// ],
|
|
152
|
+
urls:[
|
|
153
|
+
`http://127.0.0.1:10003/{z}/{x}/{y}.png`
|
|
136
154
|
],
|
|
155
|
+
model:{
|
|
156
|
+
id:1,
|
|
157
|
+
url:require('@/assets/layer.png'),
|
|
158
|
+
// bbox:[119.5172307870407,30.20294858200727,119.4830523878688,30.17494943404726],
|
|
159
|
+
// bbox:[119.4830523878688,30.17494943404726,119.5172307870407,30.20294858200727],
|
|
160
|
+
// bbox:[119.4830523878688,30.20294858200727,119.5172307870407,30.17494943404726],
|
|
161
|
+
bbox:[119.4830523878688,30.17494943404726,119.5172307870407,30.20294858200727],
|
|
162
|
+
zIndex:10,
|
|
163
|
+
},
|
|
164
|
+
model2:{
|
|
165
|
+
id:2,
|
|
166
|
+
url:require('@/assets/linan.png'),
|
|
167
|
+
// bbox:[119.5172307870407,30.20294858200727,119.4830523878688,30.17494943404726],
|
|
168
|
+
// bbox:[119.4830523878688,30.17494943404726,119.5172307870407,30.20294858200727],
|
|
169
|
+
// bbox:[119.4830523878688,30.20294858200727,119.5172307870407,30.17494943404726],
|
|
170
|
+
bbox:[119.485901,30.177281,119.514383,30.200616],
|
|
171
|
+
zIndex:9,
|
|
172
|
+
},
|
|
137
173
|
dto: null,
|
|
138
174
|
};
|
|
139
175
|
},
|
|
@@ -152,6 +188,14 @@
|
|
|
152
188
|
trackPlayEvent(e) {
|
|
153
189
|
console.log(e);
|
|
154
190
|
},
|
|
191
|
+
loadMap(e){
|
|
192
|
+
// this.kmlDto={
|
|
193
|
+
// bbox:[119.4830523878688,30.17494943404726,119.5172307870407,30.20294858200727],
|
|
194
|
+
// id: 'workId',
|
|
195
|
+
// url:'http://localhost:7601/1.kml',
|
|
196
|
+
// gcj02Url:'http://localhost:7601/1.kml'
|
|
197
|
+
// };
|
|
198
|
+
},
|
|
155
199
|
load(obj) {
|
|
156
200
|
console.log(obj);
|
|
157
201
|
this.lMap = obj.mapServices;
|
|
@@ -182,7 +226,7 @@
|
|
|
182
226
|
},
|
|
183
227
|
mapMoveend(e) {
|
|
184
228
|
// alert(1);
|
|
185
|
-
|
|
229
|
+
console.log(e);
|
|
186
230
|
},
|
|
187
231
|
loadDrawPolygonEvent(e) {
|
|
188
232
|
this.mapTool = e;
|