ry-vue-map 0.6.2 → 0.6.3
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/package.json +2 -2
- package/src/components/maps/models/ryKML/index.js +8 -1
- package/src/components/maps/models/ryKMLs/index.js +7 -2
- package/src/components/maps/ryKML/src/index.vue +161 -159
- package/src/components/maps/ryKMLs/src/index.vue +23 -22
- package/src/views/map/index.vue +3 -1053
- package/src/views/map/3301.js +0 -96828
- package/src/views/map/330112.js +0 -5106
- package/src/views/map/330681.js +0 -3454
- package/src/views/map/331123.js +0 -4736
- package/src/views/map/ceshijson.js +0 -323
- package/src/views/map/ceshisuhusss.js +0 -7587
- package/src/views/map/dksj.js +0 -482171
- package/src/views/map/imgUrl.js +0 -1517
- package/src/views/map/index3.vue +0 -207
- package/src/views/map/index4.vue +0 -207
- package/src/views/map/indexNew.vue +0 -625
- package/src/views/map/indexStatic.vue +0 -1
- package/src/views/map/indexsssss.vue +0 -762
- package/src/views/map/line.vue +0 -1045
- package/src/views/map/lineData.js +0 -19592
- package/src/views/map/lineData2.js +0 -3449
- package/src/views/map/new_file.vue +0 -280
- package/src/views/map/obj.js +0 -10014
package/src/views/map/index3.vue
DELETED
|
@@ -1,207 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="map-style">
|
|
3
|
-
|
|
4
|
-
<ry-map projection="EPSG:4326" :zoom="10" :minZoom="1" :maxZoom="maxZoom" :center="center" @load="load($event)"
|
|
5
|
-
:isCrossHair="isRyMapTool" :isRight="true" :isRyMapTool="true" @drawSuccess="drawSuccess"
|
|
6
|
-
@drawError="drawError" :isShowRangingTool="true" :isShowDrawTool="isRyMapTool" :bindMapClick="true"
|
|
7
|
-
@mapClick="mapClick($event)" @crossHairClick="crossHairClick($event)" :bindMapMoveend="true"
|
|
8
|
-
@mapMoveend="mapMoveend($event)"
|
|
9
|
-
v-if="dto"
|
|
10
|
-
:boundaryModel="dto"
|
|
11
|
-
:urls="urls"
|
|
12
|
-
:bbox="bbox"
|
|
13
|
-
>
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
</ry-map>
|
|
17
|
-
|
|
18
|
-
<button @click="onClick()">测试</button>
|
|
19
|
-
<button @click="onClick2()">测试2</button>
|
|
20
|
-
<button @click="onClick3()">测试3</button>
|
|
21
|
-
|
|
22
|
-
<aside class="aside-style">
|
|
23
|
-
<el-button
|
|
24
|
-
class="ele-text-primary" v-show="isShowPaly" style="padding:10px;" @click.stop="onShowPaly(false)">
|
|
25
|
-
轨迹回放 </el-button>
|
|
26
|
-
|
|
27
|
-
<el-button
|
|
28
|
-
class="ele-text-primary" v-show="!isShowPaly" style="padding:10px; color: red;" @click.stop="onShowPaly(true)">
|
|
29
|
-
结束轨迹回放 </el-button>
|
|
30
|
-
</aside>
|
|
31
|
-
</div>
|
|
32
|
-
</template>
|
|
33
|
-
|
|
34
|
-
<script>
|
|
35
|
-
import dayjs from 'dayjs'
|
|
36
|
-
import RyMap from '@/components/maps/ryOfflineMap/src/index.vue';
|
|
37
|
-
import RyMapTool from '@/components/maps/ryMapTool/src/index.vue';
|
|
38
|
-
import RyPolygon from '@/components/maps/ryPolygon/src/index.vue';
|
|
39
|
-
import RyPolygons from '@/components/maps/ryPolygons/src/index.vue';
|
|
40
|
-
import RyClustersMarker from '@/components/maps/ryClustersMarker/src/index.vue';
|
|
41
|
-
import RyPolygonGeo from '@/components/maps/ryPolygonGeo/src/index.vue';
|
|
42
|
-
import geoJson from "./330112";
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
export default {
|
|
47
|
-
components: {
|
|
48
|
-
RyMap,
|
|
49
|
-
RyMapTool,
|
|
50
|
-
RyPolygon,
|
|
51
|
-
RyPolygons,
|
|
52
|
-
RyClustersMarker,
|
|
53
|
-
RyPolygonGeo,
|
|
54
|
-
},
|
|
55
|
-
data() {
|
|
56
|
-
return {
|
|
57
|
-
map: null,
|
|
58
|
-
lMap: null,
|
|
59
|
-
polygonColorObj: null,
|
|
60
|
-
// const bbox = [ 118.84072600000002, 29.937127000000032, 119.86315600000012, 30.445895000000064 ];
|
|
61
|
-
// const center = [119.34667114000006, 30.198078622500038];
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
bbox: [118.84072600000002, 29.937127000000032, 119.86315600000012, 30.445895000000064],
|
|
65
|
-
isClear: false,
|
|
66
|
-
colors: [],
|
|
67
|
-
modelArr2: [
|
|
68
|
-
{id:'ceshi1', x:120.15535003220648,y:30.179378795342608},
|
|
69
|
-
{id:'ceshi2',x:120.16369976775891,y:30.1967116895034},
|
|
70
|
-
{id:'ceshi3',x:120.156817,y:30.1753985} ,
|
|
71
|
-
{id:'ceshi4',x:120.1538245,y:30.183076} ,
|
|
72
|
-
],
|
|
73
|
-
center: [119.34667114000006, 30.198078622500038],
|
|
74
|
-
polygonColors: [],
|
|
75
|
-
remove: 'ceshi1',
|
|
76
|
-
removes: [],
|
|
77
|
-
ranges: [],
|
|
78
|
-
restFit: true,
|
|
79
|
-
range: 'ceshi2',
|
|
80
|
-
isFit: false,
|
|
81
|
-
insert: null,
|
|
82
|
-
showPolygon: null,
|
|
83
|
-
showPolygons: [{
|
|
84
|
-
id: 'ceshi2',
|
|
85
|
-
isShow: false
|
|
86
|
-
}],
|
|
87
|
-
inserts: [],
|
|
88
|
-
isShowAll: false,
|
|
89
|
-
polygonModel: null,
|
|
90
|
-
mapTool: null,
|
|
91
|
-
isCheckPoint: null,
|
|
92
|
-
gpsType: 0,
|
|
93
|
-
isRyMapTool: true,
|
|
94
|
-
maxZoom: 18,
|
|
95
|
-
lineData1:null,
|
|
96
|
-
lineData2:null,
|
|
97
|
-
clearLiens:false,
|
|
98
|
-
// startMarkerDto:null,
|
|
99
|
-
// endMarkerDto:null,
|
|
100
|
-
startMarkerDto: {
|
|
101
|
-
url:require('@/assets/startpoint.png'),
|
|
102
|
-
height:23,
|
|
103
|
-
offset:[8, -11],
|
|
104
|
-
width:28
|
|
105
|
-
},
|
|
106
|
-
endMarkerDto:{
|
|
107
|
-
url:require('@/assets/stoppoint.png'),
|
|
108
|
-
height:16,
|
|
109
|
-
offset:[0, -8],
|
|
110
|
-
width:16
|
|
111
|
-
},
|
|
112
|
-
lineAppend:[],
|
|
113
|
-
isShowPaly:true,
|
|
114
|
-
layerArr:[2,2],
|
|
115
|
-
urls:[
|
|
116
|
-
`http://127.0.0.1:10006/${330112}/satellite/{z}/{x}/{y}.jpg`,
|
|
117
|
-
`http://127.0.0.1:10006/${330112}/overlay/{z}/{x}/{y}.png`
|
|
118
|
-
],
|
|
119
|
-
dto:null,
|
|
120
|
-
};
|
|
121
|
-
},
|
|
122
|
-
created() {
|
|
123
|
-
this.dto={
|
|
124
|
-
geo:geoJson,
|
|
125
|
-
width:4,
|
|
126
|
-
color:'#000'
|
|
127
|
-
};
|
|
128
|
-
console.log(this.dto);
|
|
129
|
-
},
|
|
130
|
-
methods: {
|
|
131
|
-
onShowPaly(b) {
|
|
132
|
-
this.isShowPaly = b;
|
|
133
|
-
|
|
134
|
-
},
|
|
135
|
-
load(obj) {
|
|
136
|
-
this.lMap = obj.mapServices;
|
|
137
|
-
this.map = obj.map;
|
|
138
|
-
console.log(this.lMap);
|
|
139
|
-
|
|
140
|
-
},
|
|
141
|
-
drawSuccess(obj) {
|
|
142
|
-
this.polygonModel = {
|
|
143
|
-
fillColor: '#000',
|
|
144
|
-
stroke: '#fff',
|
|
145
|
-
width: 4,
|
|
146
|
-
text: '',
|
|
147
|
-
geo: obj.geoJson,
|
|
148
|
-
id: 'ceshi',
|
|
149
|
-
};
|
|
150
|
-
},
|
|
151
|
-
drawError(obj) {},
|
|
152
|
-
mapClick(e) {
|
|
153
|
-
// alert(e);
|
|
154
|
-
},
|
|
155
|
-
onLoad(e) {},
|
|
156
|
-
crossHairClick(e) {
|
|
157
|
-
// console.log(e);
|
|
158
|
-
},
|
|
159
|
-
mapMoveend(e) {
|
|
160
|
-
// alert(1);
|
|
161
|
-
// console.log(e);
|
|
162
|
-
},
|
|
163
|
-
loadDrawPolygonEvent(e) {
|
|
164
|
-
this.mapTool = e;
|
|
165
|
-
},
|
|
166
|
-
clusterCallback({
|
|
167
|
-
id,
|
|
168
|
-
isShow
|
|
169
|
-
}) {
|
|
170
|
-
setTimeout(r => {
|
|
171
|
-
this.showPolygon = {
|
|
172
|
-
id,
|
|
173
|
-
isShow
|
|
174
|
-
};
|
|
175
|
-
this.isCheckPoint = {
|
|
176
|
-
id,
|
|
177
|
-
isShow
|
|
178
|
-
};
|
|
179
|
-
}, 50);
|
|
180
|
-
},
|
|
181
|
-
changeSwitchMap(obj) {
|
|
182
|
-
if (obj.mapType == 2) {
|
|
183
|
-
this.gpsType = 0;
|
|
184
|
-
return;
|
|
185
|
-
}
|
|
186
|
-
this.gpsType = obj.mapType;
|
|
187
|
-
},
|
|
188
|
-
onClick() {
|
|
189
|
-
this.isRyMapTool = !this.isRyMapTool;
|
|
190
|
-
},
|
|
191
|
-
onClick2() {
|
|
192
|
-
this.maxZoom = 28;
|
|
193
|
-
},
|
|
194
|
-
onClick3() {
|
|
195
|
-
this.maxZoom = 10;
|
|
196
|
-
},
|
|
197
|
-
|
|
198
|
-
}
|
|
199
|
-
};
|
|
200
|
-
</script>
|
|
201
|
-
|
|
202
|
-
<style lang="scss" scoped>
|
|
203
|
-
.map-style {
|
|
204
|
-
height: 100vh;
|
|
205
|
-
position: relative;
|
|
206
|
-
}
|
|
207
|
-
</style>
|
package/src/views/map/index4.vue
DELETED
|
@@ -1,207 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="map-style">
|
|
3
|
-
|
|
4
|
-
<ry-map projection="EPSG:4326" :zoom="10" :minZoom="1" :maxZoom="maxZoom" :center="center" @load="load($event)"
|
|
5
|
-
:isCrossHair="isRyMapTool" :isRight="true" :isRyMapTool="true" @drawSuccess="drawSuccess"
|
|
6
|
-
@drawError="drawError" :isShowRangingTool="true" :isShowDrawTool="isRyMapTool" :bindMapClick="true"
|
|
7
|
-
@mapClick="mapClick($event)" @crossHairClick="crossHairClick($event)" :bindMapMoveend="true"
|
|
8
|
-
@mapMoveend="mapMoveend($event)"
|
|
9
|
-
v-if="dto"
|
|
10
|
-
:boundaryModel="dto"
|
|
11
|
-
:urls="urls"
|
|
12
|
-
:bbox="bbox"
|
|
13
|
-
>
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
</ry-map>
|
|
17
|
-
|
|
18
|
-
<button @click="onClick()">测试</button>
|
|
19
|
-
<button @click="onClick2()">测试2</button>
|
|
20
|
-
<button @click="onClick3()">测试3</button>
|
|
21
|
-
|
|
22
|
-
<aside class="aside-style">
|
|
23
|
-
<el-button
|
|
24
|
-
class="ele-text-primary" v-show="isShowPaly" style="padding:10px;" @click.stop="onShowPaly(false)">
|
|
25
|
-
轨迹回放 </el-button>
|
|
26
|
-
|
|
27
|
-
<el-button
|
|
28
|
-
class="ele-text-primary" v-show="!isShowPaly" style="padding:10px; color: red;" @click.stop="onShowPaly(true)">
|
|
29
|
-
结束轨迹回放 </el-button>
|
|
30
|
-
</aside>
|
|
31
|
-
</div>
|
|
32
|
-
</template>
|
|
33
|
-
|
|
34
|
-
<script>
|
|
35
|
-
import dayjs from 'dayjs'
|
|
36
|
-
import RyMap from '@/components/maps/ryOfflineMap/src/index.vue';
|
|
37
|
-
import RyMapTool from '@/components/maps/ryMapTool/src/index.vue';
|
|
38
|
-
import RyPolygon from '@/components/maps/ryPolygon/src/index.vue';
|
|
39
|
-
import RyPolygons from '@/components/maps/ryPolygons/src/index.vue';
|
|
40
|
-
import RyClustersMarker from '@/components/maps/ryClustersMarker/src/index.vue';
|
|
41
|
-
import RyPolygonGeo from '@/components/maps/ryPolygonGeo/src/index.vue';
|
|
42
|
-
import geoJson from "./330112";
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
export default {
|
|
47
|
-
components: {
|
|
48
|
-
RyMap,
|
|
49
|
-
RyMapTool,
|
|
50
|
-
RyPolygon,
|
|
51
|
-
RyPolygons,
|
|
52
|
-
RyClustersMarker,
|
|
53
|
-
RyPolygonGeo,
|
|
54
|
-
},
|
|
55
|
-
data() {
|
|
56
|
-
return {
|
|
57
|
-
map: null,
|
|
58
|
-
lMap: null,
|
|
59
|
-
polygonColorObj: null,
|
|
60
|
-
// const bbox = [ 118.84072600000002, 29.937127000000032, 119.86315600000012, 30.445895000000064 ];
|
|
61
|
-
// const center = [119.34667114000006, 30.198078622500038];
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
bbox: [118.84072600000002, 29.937127000000032, 119.86315600000012, 30.445895000000064],
|
|
65
|
-
isClear: false,
|
|
66
|
-
colors: [],
|
|
67
|
-
modelArr2: [
|
|
68
|
-
{id:'ceshi1', x:120.15535003220648,y:30.179378795342608},
|
|
69
|
-
{id:'ceshi2',x:120.16369976775891,y:30.1967116895034},
|
|
70
|
-
{id:'ceshi3',x:120.156817,y:30.1753985} ,
|
|
71
|
-
{id:'ceshi4',x:120.1538245,y:30.183076} ,
|
|
72
|
-
],
|
|
73
|
-
center: [119.34667114000006, 30.198078622500038],
|
|
74
|
-
polygonColors: [],
|
|
75
|
-
remove: 'ceshi1',
|
|
76
|
-
removes: [],
|
|
77
|
-
ranges: [],
|
|
78
|
-
restFit: true,
|
|
79
|
-
range: 'ceshi2',
|
|
80
|
-
isFit: false,
|
|
81
|
-
insert: null,
|
|
82
|
-
showPolygon: null,
|
|
83
|
-
showPolygons: [{
|
|
84
|
-
id: 'ceshi2',
|
|
85
|
-
isShow: false
|
|
86
|
-
}],
|
|
87
|
-
inserts: [],
|
|
88
|
-
isShowAll: false,
|
|
89
|
-
polygonModel: null,
|
|
90
|
-
mapTool: null,
|
|
91
|
-
isCheckPoint: null,
|
|
92
|
-
gpsType: 0,
|
|
93
|
-
isRyMapTool: true,
|
|
94
|
-
maxZoom: 18,
|
|
95
|
-
lineData1:null,
|
|
96
|
-
lineData2:null,
|
|
97
|
-
clearLiens:false,
|
|
98
|
-
// startMarkerDto:null,
|
|
99
|
-
// endMarkerDto:null,
|
|
100
|
-
startMarkerDto: {
|
|
101
|
-
url:require('@/assets/startpoint.png'),
|
|
102
|
-
height:23,
|
|
103
|
-
offset:[8, -11],
|
|
104
|
-
width:28
|
|
105
|
-
},
|
|
106
|
-
endMarkerDto:{
|
|
107
|
-
url:require('@/assets/stoppoint.png'),
|
|
108
|
-
height:16,
|
|
109
|
-
offset:[0, -8],
|
|
110
|
-
width:16
|
|
111
|
-
},
|
|
112
|
-
lineAppend:[],
|
|
113
|
-
isShowPaly:true,
|
|
114
|
-
layerArr:[2,2],
|
|
115
|
-
urls:[
|
|
116
|
-
`http://127.0.0.1:10006/${330112}/satellite/{z}/{x}/{y}.jpg`,
|
|
117
|
-
`http://127.0.0.1:10006/${330112}/overlay/{z}/{x}/{y}.png`
|
|
118
|
-
],
|
|
119
|
-
dto:null,
|
|
120
|
-
};
|
|
121
|
-
},
|
|
122
|
-
created() {
|
|
123
|
-
this.dto={
|
|
124
|
-
geo:geoJson,
|
|
125
|
-
width:4,
|
|
126
|
-
color:'#000'
|
|
127
|
-
};
|
|
128
|
-
console.log(this.dto);
|
|
129
|
-
},
|
|
130
|
-
methods: {
|
|
131
|
-
onShowPaly(b) {
|
|
132
|
-
this.isShowPaly = b;
|
|
133
|
-
|
|
134
|
-
},
|
|
135
|
-
load(obj) {
|
|
136
|
-
this.lMap = obj.mapServices;
|
|
137
|
-
this.map = obj.map;
|
|
138
|
-
console.log(this.lMap);
|
|
139
|
-
|
|
140
|
-
},
|
|
141
|
-
drawSuccess(obj) {
|
|
142
|
-
this.polygonModel = {
|
|
143
|
-
fillColor: '#000',
|
|
144
|
-
stroke: '#fff',
|
|
145
|
-
width: 4,
|
|
146
|
-
text: '',
|
|
147
|
-
geo: obj.geoJson,
|
|
148
|
-
id: 'ceshi',
|
|
149
|
-
};
|
|
150
|
-
},
|
|
151
|
-
drawError(obj) {},
|
|
152
|
-
mapClick(e) {
|
|
153
|
-
// alert(e);
|
|
154
|
-
},
|
|
155
|
-
onLoad(e) {},
|
|
156
|
-
crossHairClick(e) {
|
|
157
|
-
// console.log(e);
|
|
158
|
-
},
|
|
159
|
-
mapMoveend(e) {
|
|
160
|
-
// alert(1);
|
|
161
|
-
// console.log(e);
|
|
162
|
-
},
|
|
163
|
-
loadDrawPolygonEvent(e) {
|
|
164
|
-
this.mapTool = e;
|
|
165
|
-
},
|
|
166
|
-
clusterCallback({
|
|
167
|
-
id,
|
|
168
|
-
isShow
|
|
169
|
-
}) {
|
|
170
|
-
setTimeout(r => {
|
|
171
|
-
this.showPolygon = {
|
|
172
|
-
id,
|
|
173
|
-
isShow
|
|
174
|
-
};
|
|
175
|
-
this.isCheckPoint = {
|
|
176
|
-
id,
|
|
177
|
-
isShow
|
|
178
|
-
};
|
|
179
|
-
}, 50);
|
|
180
|
-
},
|
|
181
|
-
changeSwitchMap(obj) {
|
|
182
|
-
if (obj.mapType == 2) {
|
|
183
|
-
this.gpsType = 0;
|
|
184
|
-
return;
|
|
185
|
-
}
|
|
186
|
-
this.gpsType = obj.mapType;
|
|
187
|
-
},
|
|
188
|
-
onClick() {
|
|
189
|
-
this.isRyMapTool = !this.isRyMapTool;
|
|
190
|
-
},
|
|
191
|
-
onClick2() {
|
|
192
|
-
this.maxZoom = 28;
|
|
193
|
-
},
|
|
194
|
-
onClick3() {
|
|
195
|
-
this.maxZoom = 10;
|
|
196
|
-
},
|
|
197
|
-
|
|
198
|
-
}
|
|
199
|
-
};
|
|
200
|
-
</script>
|
|
201
|
-
|
|
202
|
-
<style lang="scss" scoped>
|
|
203
|
-
.map-style {
|
|
204
|
-
height: 100vh;
|
|
205
|
-
position: relative;
|
|
206
|
-
}
|
|
207
|
-
</style>
|