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
package/lib/ryui.umd.min.js.gz
CHANGED
|
Binary file
|
package/package.json
CHANGED
package/src/assets/map.png
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
watch: {
|
|
25
25
|
model(val) {
|
|
26
26
|
this._remove();
|
|
27
|
-
if (!val
|
|
27
|
+
if (!val) return;
|
|
28
28
|
this.init(val);
|
|
29
29
|
},
|
|
30
30
|
gpsType(val) {
|
|
@@ -68,17 +68,22 @@
|
|
|
68
68
|
url,
|
|
69
69
|
bbox,
|
|
70
70
|
zIndex,
|
|
71
|
+
projection
|
|
71
72
|
} = dto;
|
|
73
|
+
let _projection = 'EPSG:4326';
|
|
74
|
+
if (projection instanceof Object) {
|
|
75
|
+
_projection= projection;
|
|
76
|
+
}
|
|
72
77
|
const img = new StaticImage({
|
|
73
78
|
id,
|
|
74
79
|
url,
|
|
75
80
|
imageExtent:bbox,
|
|
76
81
|
zIndex,
|
|
77
|
-
type:this.gpsType
|
|
82
|
+
type:this.gpsType,
|
|
83
|
+
projection:_projection,
|
|
78
84
|
},
|
|
79
85
|
this.map);
|
|
80
86
|
this.staticImg=img;
|
|
81
|
-
|
|
82
87
|
this.setBBOXArr(bbox);
|
|
83
88
|
},
|
|
84
89
|
setBBOXArr(bbox) {
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="vector-map" v-lmap:loadMap>
|
|
3
|
+
<slot name="polygon" :mapDto="{map,lMap}">
|
|
3
4
|
|
|
5
|
+
</slot>
|
|
4
6
|
</div>
|
|
5
7
|
</template>
|
|
6
8
|
|
|
@@ -80,6 +82,7 @@
|
|
|
80
82
|
callback: r => this.$emit('initLayersEvent', r),
|
|
81
83
|
});
|
|
82
84
|
this.map=map;
|
|
85
|
+
|
|
83
86
|
this.vmap=vmap;
|
|
84
87
|
this.polygonMap=vmap.getLayerMap;
|
|
85
88
|
this._bingMapEvent();
|
package/src/router/index.js
CHANGED
|
@@ -11,7 +11,8 @@ Vue.use(VueRouter);
|
|
|
11
11
|
const routes = [
|
|
12
12
|
{
|
|
13
13
|
path: '/',
|
|
14
|
-
component: () => import('@/views/map'),
|
|
14
|
+
// component: () => import('@/views/map'),
|
|
15
|
+
component: () => import('@/views/vectorMap'),
|
|
15
16
|
meta: { title: '地图' }
|
|
16
17
|
},
|
|
17
18
|
{
|
|
@@ -40,7 +41,7 @@ const routes = [
|
|
|
40
41
|
meta: { title: 'docx' }
|
|
41
42
|
},
|
|
42
43
|
{
|
|
43
|
-
path: '/',
|
|
44
|
+
path: '/vectorMap',
|
|
44
45
|
component: () => import('@/views/vectorMap'),
|
|
45
46
|
meta: { title: '地图' }
|
|
46
47
|
},
|
package/src/views/map/index.vue
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="map-style">
|
|
3
|
-
|
|
4
|
-
<ry-map :maxZoom="18" @load="loadMap($event)" :isShowSwitchMap="false" :layerType="2" :mapType="0">
|
|
5
|
-
<template #polygon="{ mapDto }">
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
</RyStaticLayer>
|
|
9
|
-
<RyStaticLayer :map="mapDto.map" :model="model">
|
|
10
|
-
|
|
11
|
-
</RyStaticLayer>
|
|
12
|
-
</template>
|
|
13
|
-
</ry-map>
|
|
14
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div class="map-style">
|
|
3
|
+
|
|
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
15
|
<!-- <RyOfflineMap
|
|
16
16
|
class="ry-offline-map"
|
|
17
17
|
:urls="urls"
|
|
@@ -20,256 +20,261 @@
|
|
|
20
20
|
:maxZoom="18"
|
|
21
21
|
@load="load"
|
|
22
22
|
>
|
|
23
|
-
</RyOfflineMap> -->
|
|
24
|
-
|
|
25
|
-
<button @click="onClick()">测试</button>
|
|
26
|
-
<button @click="onClick2()">测试2</button>
|
|
27
|
-
<button @click="onClick3()">测试3</button>
|
|
28
|
-
|
|
29
|
-
<!-- <aside class="aside-style">
|
|
30
|
-
<el-button class="ele-text-primary" v-show="isShowPaly" style="padding:10px;"
|
|
31
|
-
@click.stop="onShowPaly(false)">
|
|
32
|
-
轨迹回放 </el-button>
|
|
33
|
-
|
|
34
|
-
<el-button class="ele-text-primary" v-show="!isShowPaly" style="padding:10px; color: red;"
|
|
35
|
-
@click.stop="onShowPaly(true)">
|
|
36
|
-
结束轨迹回放 </el-button>
|
|
37
|
-
</aside> -->
|
|
38
|
-
</div>
|
|
39
|
-
</template>
|
|
40
|
-
|
|
41
|
-
<script>
|
|
42
|
-
import dayjs from 'dayjs'
|
|
43
|
-
import RyMap from '@/components/maps/ryMap/src/index.vue';
|
|
44
|
-
import RyOfflineMap from '@/components/maps/ryOfflineMap/src/index.vue';
|
|
45
|
-
|
|
46
|
-
import RyMapTool from '@/components/maps/ryMapTool/src/index.vue';
|
|
47
|
-
import RyPolygon from '@/components/maps/ryPolygon/src/index.vue';
|
|
48
|
-
import RyPolygons from '@/components/maps/ryPolygons/src/index.vue';
|
|
49
|
-
import RyClustersMarker from '@/components/maps/ryClustersMarker/src/index.vue';
|
|
50
|
-
import RyPolygonGeo from '@/components/maps/ryPolygonGeo/src/index.vue';
|
|
51
|
-
import geoJson from "./330112";
|
|
52
|
-
import LineObj from './obj'
|
|
53
|
-
import RyLines from '@/components/maps/ryLines/src/index.vue';
|
|
54
|
-
import RyKML from '@/components/maps/ryKML/src/index.vue';
|
|
55
|
-
import RyStaticLayer from '@/components/maps/ryStaticLayer/src/index.vue';
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
//
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
endMarkerDto:
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
//
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
this.
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
},
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
23
|
+
</RyOfflineMap> -->
|
|
24
|
+
|
|
25
|
+
<button @click="onClick()">测试</button>
|
|
26
|
+
<button @click="onClick2()">测试2</button>
|
|
27
|
+
<button @click="onClick3()">测试3</button>
|
|
28
|
+
|
|
29
|
+
<!-- <aside class="aside-style">
|
|
30
|
+
<el-button class="ele-text-primary" v-show="isShowPaly" style="padding:10px;"
|
|
31
|
+
@click.stop="onShowPaly(false)">
|
|
32
|
+
轨迹回放 </el-button>
|
|
33
|
+
|
|
34
|
+
<el-button class="ele-text-primary" v-show="!isShowPaly" style="padding:10px; color: red;"
|
|
35
|
+
@click.stop="onShowPaly(true)">
|
|
36
|
+
结束轨迹回放 </el-button>
|
|
37
|
+
</aside> -->
|
|
38
|
+
</div>
|
|
39
|
+
</template>
|
|
40
|
+
|
|
41
|
+
<script>
|
|
42
|
+
import dayjs from 'dayjs'
|
|
43
|
+
import RyMap from '@/components/maps/ryMap/src/index.vue';
|
|
44
|
+
import RyOfflineMap from '@/components/maps/ryOfflineMap/src/index.vue';
|
|
45
|
+
|
|
46
|
+
import RyMapTool from '@/components/maps/ryMapTool/src/index.vue';
|
|
47
|
+
import RyPolygon from '@/components/maps/ryPolygon/src/index.vue';
|
|
48
|
+
import RyPolygons from '@/components/maps/ryPolygons/src/index.vue';
|
|
49
|
+
import RyClustersMarker from '@/components/maps/ryClustersMarker/src/index.vue';
|
|
50
|
+
import RyPolygonGeo from '@/components/maps/ryPolygonGeo/src/index.vue';
|
|
51
|
+
import geoJson from "./330112";
|
|
52
|
+
import LineObj from './obj'
|
|
53
|
+
import RyLines from '@/components/maps/ryLines/src/index.vue';
|
|
54
|
+
import RyKML from '@/components/maps/ryKML/src/index.vue';
|
|
55
|
+
import RyStaticLayer from '@/components/maps/ryStaticLayer/src/index.vue';
|
|
56
|
+
const bboxs=[
|
|
57
|
+
[119.4832605106809,30.17522722800645,119.5162239935529,30.20240023288245],
|
|
58
|
+
[119.4832605106809,30.17522722800645,119.5162239935529,30.20240023288245],
|
|
59
|
+
[119.4832605106809,30.17522722800645,119.5162239935529,30.20240023288245],
|
|
60
|
+
[119.4832605106809,30.17522722800645,119.5162239935529,30.20240023288245],
|
|
61
|
+
[119.4830523878688,30.17494943404726,119.5172307870407,30.20294858200727],
|
|
62
|
+
];
|
|
63
|
+
export default {
|
|
64
|
+
components: {
|
|
65
|
+
RyMap,
|
|
66
|
+
RyMapTool,
|
|
67
|
+
RyPolygon,
|
|
68
|
+
RyPolygons,
|
|
69
|
+
RyClustersMarker,
|
|
70
|
+
RyPolygonGeo,
|
|
71
|
+
RyLines,
|
|
72
|
+
RyKML,
|
|
73
|
+
RyStaticLayer,
|
|
74
|
+
RyOfflineMap
|
|
75
|
+
},
|
|
76
|
+
data() {
|
|
77
|
+
return {
|
|
78
|
+
// bbox:[119.5172307870407,30.20294858200727,119.4830523878688,30.17494943404726],
|
|
79
|
+
kmlDto:null,
|
|
80
|
+
map: null,
|
|
81
|
+
lMap: null,
|
|
82
|
+
polygonColorObj: null,
|
|
83
|
+
lineData: null,
|
|
84
|
+
isShowPaly: false,
|
|
85
|
+
// const bbox = [ 118.84072600000002, 29.937127000000032, 119.86315600000012, 30.445895000000064 ];
|
|
86
|
+
// const center = [119.34667114000006, 30.198078622500038];
|
|
87
|
+
|
|
88
|
+
// bbox: [118.84146054770122, 29.935677496166022, 119.86391954737257, 30.44823698639243],
|
|
89
|
+
isClear: false,
|
|
90
|
+
colors: [],
|
|
91
|
+
modelArr2: [{
|
|
92
|
+
id: 'ceshi1',
|
|
93
|
+
x: 120.15535003220648,
|
|
94
|
+
y: 30.179378795342608
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
id: 'ceshi2',
|
|
98
|
+
x: 120.16369976775891,
|
|
99
|
+
y: 30.1967116895034
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
id: 'ceshi3',
|
|
103
|
+
x: 120.156817,
|
|
104
|
+
y: 30.1753985
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
id: 'ceshi4',
|
|
108
|
+
x: 120.1538245,
|
|
109
|
+
y: 30.183076
|
|
110
|
+
},
|
|
111
|
+
],
|
|
112
|
+
center: [119.45009201705076, 30.177110869281915],
|
|
113
|
+
polygonColors: [],
|
|
114
|
+
remove: 'ceshi1',
|
|
115
|
+
removes: [],
|
|
116
|
+
ranges: [],
|
|
117
|
+
restFit: true,
|
|
118
|
+
range: 'ceshi2',
|
|
119
|
+
isFit: false,
|
|
120
|
+
insert: null,
|
|
121
|
+
showPolygon: null,
|
|
122
|
+
showPolygons: [{
|
|
123
|
+
id: 'ceshi2',
|
|
124
|
+
isShow: false
|
|
125
|
+
}],
|
|
126
|
+
inserts: [],
|
|
127
|
+
isShowAll: false,
|
|
128
|
+
polygonModel: null,
|
|
129
|
+
mapTool: null,
|
|
130
|
+
isCheckPoint: null,
|
|
131
|
+
gpsType: 1,
|
|
132
|
+
isRyMapTool: true,
|
|
133
|
+
maxZoom: 18,
|
|
134
|
+
lineData1: null,
|
|
135
|
+
lineData2: null,
|
|
136
|
+
clearLiens: false,
|
|
137
|
+
// startMarkerDto:null,
|
|
138
|
+
// endMarkerDto:null,
|
|
139
|
+
startMarkerDto: {
|
|
140
|
+
url: require('@/assets/startpoint.png'),
|
|
141
|
+
height: 23,
|
|
142
|
+
offset: [8, -11],
|
|
143
|
+
width: 28
|
|
144
|
+
},
|
|
145
|
+
endMarkerDto: {
|
|
146
|
+
url: require('@/assets/stoppoint.png'),
|
|
147
|
+
height: 16,
|
|
148
|
+
offset: [0, -8],
|
|
149
|
+
width: 16
|
|
150
|
+
},
|
|
151
|
+
lineAppend: [],
|
|
152
|
+
isShowPaly: true,
|
|
153
|
+
layerArr: [2, 2],
|
|
154
|
+
// urls: [
|
|
155
|
+
// `https://zjhzla.ryaims.com/overlay/330112/satellite/{z}/{x}/{y}.jpg`,
|
|
156
|
+
// // `https://zjhzla.ryaims.com/overlay/330112/roadmap/{z}/{x}/{y}.png`,
|
|
157
|
+
// // `http://127.0.0.1:10006/${330112}/overlay/{z}/{x}/{y}.png`
|
|
158
|
+
// ],
|
|
159
|
+
urls:[
|
|
160
|
+
`http://127.0.0.1:10003/{z}/{x}/{y}.png`
|
|
161
|
+
],
|
|
162
|
+
model:null,
|
|
163
|
+
// model2:{
|
|
164
|
+
// id:2,
|
|
165
|
+
// url:require('@/assets/linan.png'),
|
|
166
|
+
// // bbox:[119.5172307870407,30.20294858200727,119.4830523878688,30.17494943404726],
|
|
167
|
+
// // bbox:[119.4830523878688,30.17494943404726,119.5172307870407,30.20294858200727],
|
|
168
|
+
// // bbox:[119.4830523878688,30.20294858200727,119.5172307870407,30.17494943404726],
|
|
169
|
+
// bbox:[119.485901,30.177281,119.514383,30.200616],
|
|
170
|
+
// zIndex:9,
|
|
171
|
+
// },
|
|
172
|
+
dto: null,
|
|
173
|
+
};
|
|
174
|
+
},
|
|
175
|
+
created() {
|
|
176
|
+
this.dto = {
|
|
177
|
+
geo: geoJson,
|
|
178
|
+
width: 6,
|
|
179
|
+
color: '#00adfd',
|
|
180
|
+
lineDash: [1, 2, 3, 4, 5, 6, 8, 9, 10],
|
|
181
|
+
};
|
|
182
|
+
},
|
|
183
|
+
methods: {
|
|
184
|
+
onShowPaly(b) {
|
|
185
|
+
this.isShowPaly = b;
|
|
186
|
+
},
|
|
187
|
+
trackPlayEvent(e) {
|
|
188
|
+
console.log(e);
|
|
189
|
+
},
|
|
190
|
+
loadMap(e){
|
|
191
|
+
this.model={
|
|
192
|
+
id:1,
|
|
193
|
+
url:'http://127.0.0.1:10003/linan2.png',
|
|
194
|
+
bbox:[118.84146054770122, 29.935677496166022, 119.86391954737257, 30.44823698639243],
|
|
195
|
+
zIndex:10,
|
|
196
|
+
};
|
|
197
|
+
// this.kmlDto={
|
|
198
|
+
// bbox:[119.4830523878688,30.17494943404726,119.5172307870407,30.20294858200727],
|
|
199
|
+
// id: 'workId',
|
|
200
|
+
// url:'http://localhost:7601/1.kml',
|
|
201
|
+
// gcj02Url:'http://localhost:7601/1.kml'
|
|
202
|
+
// };
|
|
203
|
+
},
|
|
204
|
+
load(obj) {
|
|
205
|
+
console.log(obj);
|
|
206
|
+
this.lMap = obj.mapServices;
|
|
207
|
+
this.map = obj.map;
|
|
208
|
+
setTimeout(r => {
|
|
209
|
+
this.lineData = LineObj;
|
|
210
|
+
}, 3000);
|
|
211
|
+
this.lineData = LineObj;
|
|
212
|
+
},
|
|
213
|
+
drawSuccess(obj) {
|
|
214
|
+
this.polygonModel = {
|
|
215
|
+
fillColor: '#000',
|
|
216
|
+
stroke: '#fff',
|
|
217
|
+
width: 4,
|
|
218
|
+
text: '',
|
|
219
|
+
geo: obj.geoJson,
|
|
220
|
+
id: 'ceshi',
|
|
221
|
+
};
|
|
222
|
+
},
|
|
223
|
+
drawError(obj) {},
|
|
224
|
+
mapClick(e) {
|
|
225
|
+
console.log('ee========',e);
|
|
226
|
+
// alert(e);
|
|
227
|
+
},
|
|
228
|
+
onLoad(e) {},
|
|
229
|
+
crossHairClick(e) {
|
|
230
|
+
// console.log(e);
|
|
231
|
+
},
|
|
232
|
+
mapMoveend(e) {
|
|
233
|
+
// alert(1);
|
|
234
|
+
console.log(e);
|
|
235
|
+
},
|
|
236
|
+
loadDrawPolygonEvent(e) {
|
|
237
|
+
this.mapTool = e;
|
|
238
|
+
},
|
|
239
|
+
clusterCallback({
|
|
240
|
+
id,
|
|
241
|
+
isShow
|
|
242
|
+
}) {
|
|
243
|
+
setTimeout(r => {
|
|
244
|
+
this.showPolygon = {
|
|
245
|
+
id,
|
|
246
|
+
isShow
|
|
247
|
+
};
|
|
248
|
+
this.isCheckPoint = {
|
|
249
|
+
id,
|
|
250
|
+
isShow
|
|
251
|
+
};
|
|
252
|
+
}, 50);
|
|
253
|
+
},
|
|
254
|
+
changeSwitchMap(obj) {
|
|
255
|
+
if (obj.mapType == 2) {
|
|
256
|
+
this.gpsType = 0;
|
|
257
|
+
return;
|
|
258
|
+
}
|
|
259
|
+
this.gpsType = obj.mapType;
|
|
260
|
+
},
|
|
261
|
+
onClick() {
|
|
262
|
+
this.isRyMapTool = !this.isRyMapTool;
|
|
263
|
+
},
|
|
264
|
+
onClick2() {
|
|
265
|
+
this.maxZoom = 28;
|
|
266
|
+
},
|
|
267
|
+
onClick3() {
|
|
268
|
+
this.maxZoom = 10;
|
|
269
|
+
},
|
|
270
|
+
|
|
271
|
+
}
|
|
272
|
+
};
|
|
273
|
+
</script>
|
|
274
|
+
|
|
275
|
+
<style lang="scss" scoped>
|
|
276
|
+
.map-style {
|
|
277
|
+
height: 100vh;
|
|
278
|
+
position: relative;
|
|
279
|
+
}
|
|
275
280
|
</style>
|