ry-vue-map 0.4.4 → 0.4.6
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 +61 -51
- 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 +61 -51
- 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/assets/map.png +0 -0
- package/src/assets//345/234/237/345/243/244/345/217/202/346/225/260/347/203/255/345/212/233/345/233/276/bbox.txt +4 -0
- package/src/assets//345/234/237/345/243/244/345/217/202/346/225/260/347/203/255/345/212/233/345/233/276/layer1.png +0 -0
- package/src/assets//345/234/237/345/243/244/345/217/202/346/225/260/347/203/255/345/212/233/345/233/276/layer2.png +0 -0
- package/src/assets//345/234/237/345/243/244/345/217/202/346/225/260/347/203/255/345/212/233/345/233/276/layer3.png +0 -0
- package/src/assets//345/234/237/345/243/244/345/217/202/346/225/260/347/203/255/345/212/233/345/233/276/layer4.png +0 -0
- package/src/assets//345/234/237/345/243/244/345/217/202/346/225/260/347/203/255/345/212/233/345/233/276/layer5.png +0 -0
- package/src/components/maps/models/ryStaticLayer/index.js +1 -0
- package/src/components/maps/ryStaticLayer/src/index.vue +8 -3
- package/src/components/maps/ryVectorMap/src/index.vue +3 -0
- package/src/router/index.js +3 -2
- package/src/views/map/index.vue +271 -266
- package/src/views/map/indexStatic.vue +1 -216
- package/src/views/map/new_file.vue +280 -0
- package/src/views/vectorMap/330112.js +5106 -0
- package/src/views/vectorMap/index.vue +72 -49
- package/src/assets/jsmap.png +0 -0
|
@@ -1,71 +1,93 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="map-panel"
|
|
3
|
-
<RyVectorMap
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
></RyVectorMap>
|
|
2
|
+
<div class="map-panel">
|
|
3
|
+
<RyVectorMap :isDrag="true" :bindMapClick="true" :modelArr="modelArr" class="map-style" @load="load"
|
|
4
|
+
@initLayersEvent="initLayersEvent" @mapClick="mapClick" @drawSuccess="drawSuccess($event)"
|
|
5
|
+
@drawError="drawError($event)">
|
|
6
|
+
|
|
7
|
+
<template #polygon="{ mapDto }">
|
|
8
|
+
<RyStaticLayer :map="mapDto.map" :model="model">
|
|
9
|
+
</RyStaticLayer>
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
</RyVectorMap>
|
|
14
13
|
</div>
|
|
15
14
|
</template>
|
|
16
15
|
|
|
17
16
|
<script>
|
|
18
17
|
import RyVectorMap from '@/components/maps/ryVectorMap/src/index.vue';
|
|
19
|
-
import geoArr from './
|
|
18
|
+
import geoArr from './330112';
|
|
19
|
+
import RyStaticLayer from '@/components/maps/ryStaticLayer/src/index.vue';
|
|
20
20
|
// import geoArr from './geoJson.js';
|
|
21
|
+
import Projection from 'ol/proj/Projection';
|
|
21
22
|
import {
|
|
22
|
-
|
|
23
|
+
VectorMap
|
|
23
24
|
} from 'ry-map'
|
|
24
|
-
|
|
25
|
+
|
|
25
26
|
export default {
|
|
26
27
|
components: {
|
|
27
28
|
RyVectorMap,
|
|
29
|
+
RyStaticLayer,
|
|
28
30
|
},
|
|
29
31
|
data() {
|
|
30
32
|
return {
|
|
31
33
|
map: null,
|
|
32
34
|
vmap: null,
|
|
33
|
-
modelArr:[],
|
|
34
|
-
polygonModel:null,
|
|
35
|
+
modelArr: [],
|
|
36
|
+
polygonModel: null,
|
|
37
|
+
model: null,
|
|
35
38
|
};
|
|
36
39
|
},
|
|
37
40
|
created() {
|
|
41
|
+
|
|
38
42
|
},
|
|
39
|
-
mounted(){},
|
|
43
|
+
mounted() {},
|
|
40
44
|
methods: {
|
|
41
45
|
load(obj) {
|
|
42
46
|
this.initData();
|
|
43
47
|
},
|
|
44
|
-
initData(){
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
);
|
|
57
|
-
return;
|
|
48
|
+
initData() {
|
|
49
|
+
let modelArr = [];
|
|
50
|
+
|
|
51
|
+
console.log(geoArr);
|
|
52
|
+
|
|
53
|
+
modelArr.push({
|
|
54
|
+
geo: geoArr,
|
|
55
|
+
fillColor: 'rgba(0,80,230,0.3)',
|
|
56
|
+
stroke: "rgba(192,199,237,1)",
|
|
57
|
+
strokeWidth: 0.6,
|
|
58
|
+
id: 1,
|
|
59
|
+
lineDash: new Array(),
|
|
58
60
|
});
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
modelArr
|
|
62
|
-
|
|
63
|
-
|
|
61
|
+
|
|
62
|
+
// geoArr.forEach((r, key) => {
|
|
63
|
+
// modelArr.push({
|
|
64
|
+
// geo: r,
|
|
65
|
+
// fillColor: 'rgba(0,80,230,0.3)',
|
|
66
|
+
// stroke: "rgba(192,199,237,1)",
|
|
67
|
+
// strokeWidth: 0.6,
|
|
68
|
+
// id: key + 1,
|
|
69
|
+
// lineDash: new Array(),
|
|
70
|
+
// });
|
|
71
|
+
// return;
|
|
72
|
+
// });
|
|
73
|
+
|
|
74
|
+
// modelArr[0].fillColor = 'transparent';
|
|
75
|
+
// modelArr[0].stroke = 'rgba(163,175,185,1)';
|
|
76
|
+
// modelArr[0].strokeWidth = 2;
|
|
77
|
+
this.modelArr = modelArr;
|
|
78
|
+
|
|
79
|
+
this.model = {
|
|
80
|
+
id: 1,
|
|
81
|
+
url: 'http://127.0.0.1:10003/linan2.png',
|
|
82
|
+
bbox: [118.84146054770122, 29.935677496166022, 119.86391954737257, 30.44823698639243],
|
|
83
|
+
zIndex: 100,
|
|
84
|
+
projection:{},
|
|
85
|
+
};
|
|
64
86
|
},
|
|
65
|
-
initLayersEvent(obj){
|
|
87
|
+
initLayersEvent(obj) {
|
|
66
88
|
// console.log(obj);
|
|
67
89
|
},
|
|
68
|
-
mapClick(e){
|
|
90
|
+
mapClick(e) {
|
|
69
91
|
console.log(e);
|
|
70
92
|
},
|
|
71
93
|
drawSuccess(obj) {
|
|
@@ -80,23 +102,24 @@
|
|
|
80
102
|
|
|
81
103
|
},
|
|
82
104
|
drawError(obj) {},
|
|
83
|
-
|
|
105
|
+
|
|
84
106
|
},
|
|
85
107
|
}
|
|
86
108
|
</script>
|
|
87
109
|
|
|
88
|
-
<style scoped
|
|
89
|
-
*{
|
|
110
|
+
<style scoped>
|
|
111
|
+
* {
|
|
90
112
|
padding: 0;
|
|
91
113
|
margin: 0;
|
|
92
114
|
box-sizing: border-box;
|
|
93
115
|
}
|
|
94
|
-
|
|
95
|
-
.map-panel{
|
|
96
|
-
|
|
97
|
-
|
|
116
|
+
|
|
117
|
+
.map-panel {
|
|
118
|
+
height: 100vh;
|
|
119
|
+
background: #000;
|
|
98
120
|
}
|
|
99
|
-
|
|
100
|
-
|
|
121
|
+
|
|
122
|
+
.map-style {
|
|
123
|
+
height: 100%;
|
|
101
124
|
}
|
|
102
|
-
</style>
|
|
125
|
+
</style>
|
package/src/assets/jsmap.png
DELETED
|
Binary file
|