ry-vue-map 0.2.7 → 0.2.9
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/lib/ryui.common.js +1066 -155
- 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 +1066 -155
- 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/mask.png +0 -0
- package/src/assets/play.png +0 -0
- package/src/assets/stop.png +0 -0
- package/src/components/index.js +20 -1
- package/src/components/maps/models/ryLines/ryLines.js +17 -1
- package/src/components/maps/models/ryPolygons/ryPolygons.js +8 -101
- package/src/components/maps/models/ryStaticLayer/index.js +29 -0
- package/src/components/maps/models/ryStaticLayers/index.js +45 -0
- package/src/components/maps/ryKML/src/index.vue +1 -1
- package/src/components/maps/ryLines/src/index.scss +115 -0
- package/src/components/maps/ryLines/src/index.vue +378 -26
- package/src/components/maps/ryStaticLayer/index.js +7 -0
- package/src/components/maps/ryStaticLayer/src/index.vue +154 -0
- package/src/components/maps/ryStaticLayers/index.js +7 -0
- package/src/components/maps/ryStaticLayers/src/index.vue +213 -0
- package/src/components/maps/switchMap/src/newIndex.vue +0 -1
- package/src/views/map/index.vue +405 -113
package/src/views/map/index.vue
CHANGED
|
@@ -1,96 +1,99 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="map-style">
|
|
3
3
|
|
|
4
|
-
<ry-map projection="EPSG:4326" :zoom="15" :minZoom="1" :maxZoom="maxZoom" :center="center"
|
|
4
|
+
<ry-map projection="EPSG:4326" :zoom="15" :minZoom="1" :maxZoom="maxZoom" :center="center" @load="load($event)"
|
|
5
5
|
:isCrossHair="isRyMapTool" :isRight="true" :isRyMapTool="true" @drawSuccess="drawSuccess"
|
|
6
6
|
@drawError="drawError" :isShowRangingTool="true" :isShowDrawTool="isRyMapTool" :bindMapClick="true"
|
|
7
7
|
@mapClick="mapClick($event)" @crossHairClick="crossHairClick($event)" :bindMapMoveend="true"
|
|
8
8
|
:isSwitchMapRight='true' :switchMapPosTop='60' :switchMapPosLeftOrRight="20" :switchMapHeight="40"
|
|
9
9
|
:switchMapDefaultTypeOrLayer="[1,2]" @mapMoveend="mapMoveend($event)"
|
|
10
|
-
@loadDrawPolygonEvent="loadDrawPolygonEvent($event)"
|
|
10
|
+
@loadDrawPolygonEvent="loadDrawPolygonEvent($event)"
|
|
11
11
|
@changeSwitchMap="changeSwitchMap($event)" :isShowSwitchMap="true"
|
|
12
12
|
>
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
:hideDelete="true"
|
|
20
|
-
:hideSave="true"
|
|
21
|
-
:hideLine="true"
|
|
22
|
-
:hideArea="true" -->
|
|
23
|
-
<!-- :layerType="2"
|
|
24
|
-
:mapType="1" -->
|
|
13
|
+
<!-- [121.91057586669922,29.146669387817383,121.91226196289062,29.14839744567871]
|
|
14
|
+
https://rydemo.ryaims.com:9443/ryfiles/22/795698e5e3934681831ffee55fbf04e2.png
|
|
15
|
+
|
|
16
|
+
https://rydemo.ryaims.com:9443/ryfiles/40/83c66a74b08d43318ad9acc43de580ff.png
|
|
17
|
+
[121.91577911376953,29.15501594543457,121.91645050048828,29.155576705932617] -->
|
|
18
|
+
|
|
25
19
|
<template #marker="{mapDto}">
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
20
|
+
|
|
21
|
+
<!-- <ry-lines
|
|
22
|
+
:map="mapDto.map"
|
|
23
|
+
:startMarkerDto ="startMarkerDto"
|
|
24
|
+
:endMarkerDto="endMarkerDto"
|
|
25
|
+
:moveMarkerDto="moveMarkerDto"
|
|
26
|
+
:isLineFit="true"
|
|
27
|
+
:linenIsert="lineData1"
|
|
28
|
+
:gpsType="gpsType"
|
|
29
|
+
:lineAppend="lineAppend"
|
|
30
|
+
:isShowPlayback="isShowPaly"
|
|
31
|
+
:clearLiens="clearLiens"
|
|
32
|
+
@trackPlayEvent="trackPlayEvent($event)"
|
|
33
|
+
></ry-lines> -->
|
|
34
|
+
<RyStaticLayers
|
|
35
|
+
:map="mapDto.map"
|
|
36
|
+
:modelArr="modelArr"
|
|
37
|
+
:gpsType="gpsType"
|
|
38
|
+
:clear="clearLiens"
|
|
39
|
+
:isShowAll="isStop"
|
|
40
|
+
:isShow="isShowObj"
|
|
41
|
+
>
|
|
32
42
|
|
|
43
|
+
</RyStaticLayers>
|
|
44
|
+
<RyStaticLayer
|
|
45
|
+
:map="mapDto.map"
|
|
46
|
+
:model="imgObj"
|
|
47
|
+
:gpsType="gpsType"
|
|
48
|
+
:clear="clearLiens"
|
|
49
|
+
:isShow="isStop"
|
|
50
|
+
>
|
|
51
|
+
|
|
52
|
+
</RyStaticLayer>
|
|
33
53
|
</template>
|
|
54
|
+
|
|
34
55
|
|
|
35
56
|
</ry-map>
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
<button @click="
|
|
39
|
-
<button @click="
|
|
40
|
-
<button @click="onClick3()">测试3</button>
|
|
57
|
+
<!-- :isPlayback="!isShowPaly" -->
|
|
58
|
+
<button @click="onClick()">清除轨迹</button>
|
|
59
|
+
<button @click="onClick2()">暂停轨迹回放</button>
|
|
60
|
+
<button @click="onClick3()">开始轨迹回放</button>
|
|
41
61
|
|
|
42
62
|
<aside class="aside-style">
|
|
43
63
|
<el-button
|
|
44
|
-
class="ele-text-primary"
|
|
64
|
+
class="ele-text-primary" style="padding:10px;" @click.stop="onShowPaly(true)">
|
|
45
65
|
轨迹回放 </el-button>
|
|
46
66
|
|
|
47
67
|
<el-button
|
|
48
|
-
class="ele-text-primary"
|
|
49
|
-
结束轨迹回放
|
|
68
|
+
class="ele-text-primary" style="padding:10px; color: red;" @click.stop="onShowPaly(false)">
|
|
69
|
+
结束轨迹回放
|
|
70
|
+
</el-button>
|
|
50
71
|
</aside>
|
|
51
72
|
</div>
|
|
52
73
|
</template>
|
|
53
74
|
|
|
54
75
|
<script>
|
|
55
76
|
import dayjs from 'dayjs'
|
|
56
|
-
import RyMap from '@/components/maps/ryMap/src/index.vue'
|
|
57
|
-
import RyMapTool from '@/components/maps/ryMapTool/src/index.vue'
|
|
58
|
-
import RyPolygon from '@/components/maps/ryPolygon/src/index.vue'
|
|
59
|
-
import RyPolygons from '@/components/maps/ryPolygons/src/index.vue'
|
|
60
|
-
import RyClustersMarker from '@/components/maps/ryClustersMarker/src/index.vue'
|
|
61
|
-
import RyPolygonGeo from '@/components/maps/ryPolygonGeo/src/index.vue'
|
|
62
|
-
import
|
|
63
|
-
|
|
77
|
+
import RyMap from '@/components/maps/ryMap/src/index.vue'
|
|
78
|
+
import RyMapTool from '@/components/maps/ryMapTool/src/index.vue'
|
|
79
|
+
import RyPolygon from '@/components/maps/ryPolygon/src/index.vue'
|
|
80
|
+
import RyPolygons from '@/components/maps/ryPolygons/src/index.vue'
|
|
81
|
+
import RyClustersMarker from '@/components/maps/ryClustersMarker/src/index.vue'
|
|
82
|
+
import RyPolygonGeo from '@/components/maps/ryPolygonGeo/src/index.vue'
|
|
83
|
+
import RyLines from '@/components/maps/ryLines/src/index.vue'
|
|
84
|
+
import RyStaticLayers from '@/components/maps/ryStaticLayers/src/index.vue'
|
|
85
|
+
import RyStaticLayer from '@/components/maps/ryStaticLayer/src/index.vue'
|
|
86
|
+
import gJson from './3301'
|
|
87
|
+
import gJson2 from "./331123"
|
|
88
|
+
import gJson10 from "./330681"
|
|
64
89
|
import {
|
|
65
90
|
createPolygonBoundary,
|
|
66
91
|
GPS
|
|
67
|
-
} from "ry-map"
|
|
68
|
-
|
|
69
|
-
const kmls=[
|
|
70
|
-
{
|
|
71
|
-
"id": 4,
|
|
72
|
-
"url": "https://rydemo.ryaims.com:9443/ryfiles/31/a6ab6654b9f14a7c84af7289dda6636c.kml",
|
|
73
|
-
"gcj02Url": "https://rydemo.ryaims.com:9443/ryfiles/59/817d2f7752e54c9daa48dc1738871917.kml",
|
|
74
|
-
"bbox": [
|
|
75
|
-
121.91140167,
|
|
76
|
-
29.14645833,
|
|
77
|
-
121.920475,
|
|
78
|
-
29.16052167
|
|
79
|
-
],
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
"id": 3,
|
|
83
|
-
"url": "https://rydemo.ryaims.com:9443/ryfiles/46/8c1e06765e0543cc9002b255fe41f372.kml",
|
|
84
|
-
"gcj02Url": "https://rydemo.ryaims.com:9443/ryfiles/80/2607c27c8da1408b8d8f4a9d6487eed1.kml",
|
|
85
|
-
"bbox": [
|
|
86
|
-
121.4692,
|
|
87
|
-
29.759945,
|
|
88
|
-
121.47069167,
|
|
89
|
-
29.761625
|
|
90
|
-
],
|
|
91
|
-
}
|
|
92
|
-
];
|
|
92
|
+
} from "ry-map"
|
|
93
|
+
import lineDataArr from './lineData.js'
|
|
93
94
|
|
|
95
|
+
|
|
96
|
+
|
|
94
97
|
export default {
|
|
95
98
|
components: {
|
|
96
99
|
RyMap,
|
|
@@ -99,8 +102,9 @@
|
|
|
99
102
|
RyPolygons,
|
|
100
103
|
RyClustersMarker,
|
|
101
104
|
RyPolygonGeo,
|
|
102
|
-
|
|
103
|
-
|
|
105
|
+
RyLines,
|
|
106
|
+
RyStaticLayers,
|
|
107
|
+
RyStaticLayer
|
|
104
108
|
},
|
|
105
109
|
data() {
|
|
106
110
|
return {
|
|
@@ -111,7 +115,24 @@
|
|
|
111
115
|
isClear: false,
|
|
112
116
|
geoJson: null,
|
|
113
117
|
colors: [],
|
|
114
|
-
|
|
118
|
+
modelArr:[{
|
|
119
|
+
id:'ceshi1',
|
|
120
|
+
bbox:[121.91057586669922,29.146669387817383,121.91226196289062,29.14839744567871],
|
|
121
|
+
url:'https://rydemo.ryaims.com:9443/ryfiles/22/795698e5e3934681831ffee55fbf04e2.png',
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
id:'ceshi2',
|
|
125
|
+
bbox:[121.91577911376953,29.15501594543457,121.91645050048828,29.155576705932617],
|
|
126
|
+
url:'https://rydemo.ryaims.com:9443/ryfiles/40/83c66a74b08d43318ad9acc43de580ff.png',
|
|
127
|
+
}
|
|
128
|
+
],
|
|
129
|
+
modelArr2: [
|
|
130
|
+
{id:'ceshi1', x:120.15535003220648,y:30.179378795342608},
|
|
131
|
+
{id:'ceshi2',x:120.16369976775891,y:30.1967116895034},
|
|
132
|
+
{id:'ceshi3',x:120.156817,y:30.1753985} ,
|
|
133
|
+
{id:'ceshi4',x:120.1538245,y:30.183076} ,
|
|
134
|
+
],
|
|
135
|
+
center: [ 120.2687149,29.8142052],
|
|
115
136
|
polygonColors: [],
|
|
116
137
|
remove: 'ceshi1',
|
|
117
138
|
removes: [],
|
|
@@ -127,8 +148,6 @@
|
|
|
127
148
|
}],
|
|
128
149
|
inserts: [],
|
|
129
150
|
isShowAll: false,
|
|
130
|
-
// isShow:true,
|
|
131
|
-
polygonModel: null,
|
|
132
151
|
mapTool: null,
|
|
133
152
|
isCheckPoint: null,
|
|
134
153
|
gpsType: 1,
|
|
@@ -137,7 +156,9 @@
|
|
|
137
156
|
src:require("@/assets/1.png"),
|
|
138
157
|
lineData1:null,
|
|
139
158
|
lineData2:null,
|
|
140
|
-
|
|
159
|
+
|
|
160
|
+
// startMarkerDto:null,
|
|
161
|
+
// endMarkerDto:null,
|
|
141
162
|
startMarkerDto: {
|
|
142
163
|
url:require('@/assets/startpoint.png'),
|
|
143
164
|
height:23,
|
|
@@ -150,46 +171,307 @@
|
|
|
150
171
|
offset:[0, -8],
|
|
151
172
|
width:16
|
|
152
173
|
},
|
|
174
|
+
moveMarkerDto:{
|
|
175
|
+
url:require('@/assets/moveMarker.png'),
|
|
176
|
+
height:16,
|
|
177
|
+
offset:[0, -8],
|
|
178
|
+
width:16
|
|
179
|
+
},
|
|
153
180
|
lineAppend:[],
|
|
154
|
-
isShowPaly:
|
|
181
|
+
isShowPaly:false,
|
|
155
182
|
layerArr:[2,2],
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
121.47069167,
|
|
165
|
-
29.761625
|
|
166
|
-
],
|
|
167
|
-
}
|
|
183
|
+
clearLiens:false,
|
|
184
|
+
isStop:false,
|
|
185
|
+
isShowObj:null,
|
|
186
|
+
imgObj:{
|
|
187
|
+
id:'ceshi1',
|
|
188
|
+
bbox:[121.91057586669922,29.146669387817383,121.91226196289062,29.14839744567871],
|
|
189
|
+
url:'https://rydemo.ryaims.com:9443/ryfiles/22/795698e5e3934681831ffee55fbf04e2.png',
|
|
190
|
+
},
|
|
168
191
|
}
|
|
169
192
|
},
|
|
170
193
|
created() {
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
194
|
+
|
|
195
|
+
const obj = {
|
|
196
|
+
isAppend:false,
|
|
197
|
+
color: 'green',
|
|
198
|
+
playbackColor:'#000',
|
|
199
|
+
width: 2,
|
|
200
|
+
pointArr: [],
|
|
201
|
+
creaTime:[],
|
|
202
|
+
zIndex: 1,
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
const obj2 = {
|
|
206
|
+
isAppend:false,
|
|
207
|
+
color: 'red',
|
|
208
|
+
playbackColor:'orange',
|
|
209
|
+
width: 2,
|
|
210
|
+
pointArr: [],
|
|
211
|
+
creaTime:[],
|
|
212
|
+
zIndex: 1,
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
const obj3 = {
|
|
217
|
+
isAppend:false,
|
|
218
|
+
color: 'blue',
|
|
219
|
+
playbackColor:'cadetblue',
|
|
220
|
+
width: 2,
|
|
221
|
+
pointArr: [],
|
|
222
|
+
creaTime:[],
|
|
223
|
+
zIndex: 1,
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
const obj4 = {
|
|
227
|
+
isAppend:false,
|
|
228
|
+
playbackColor:'azure',
|
|
229
|
+
color: 'yellow',
|
|
230
|
+
width: 2,
|
|
231
|
+
pointArr: [],
|
|
232
|
+
creaTime:[],
|
|
233
|
+
zIndex: 1,
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
const obj5 = {
|
|
237
|
+
isAppend:false,
|
|
238
|
+
playbackColor:'brown',
|
|
239
|
+
color: 'purple',
|
|
240
|
+
width: 2,
|
|
241
|
+
pointArr: [],
|
|
242
|
+
creaTime:[],
|
|
243
|
+
zIndex: 1,
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
const obj6 = {
|
|
247
|
+
isAppend:false,
|
|
248
|
+
playbackColor: '#00ffff',
|
|
249
|
+
color: 'black',
|
|
250
|
+
width: 2,
|
|
251
|
+
pointArr: [],
|
|
252
|
+
creaTime:[],
|
|
253
|
+
zIndex: 1,
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
// console.log(lineDataArr);
|
|
257
|
+
|
|
258
|
+
lineDataArr[0].forEach(r=> {
|
|
259
|
+
obj.pointArr.push([r.lng,r.lat])
|
|
260
|
+
obj.creaTime.push(r.creaTime)
|
|
261
|
+
})
|
|
262
|
+
|
|
263
|
+
this.lineData1=obj
|
|
264
|
+
// const len2=obj.pointArr.length;
|
|
265
|
+
// let i2=0;
|
|
266
|
+
// let setId = setInterval(r=> {
|
|
267
|
+
// this.lineAppend=obj.pointArr[i2];
|
|
268
|
+
// i2+=1;
|
|
269
|
+
// if(i2 >=len2){
|
|
270
|
+
// clearInterval(setId);
|
|
271
|
+
// }
|
|
272
|
+
// },1000);
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
lineDataArr[1].forEach(r=> {
|
|
276
|
+
obj2.pointArr.push([r.lng,r.lat])
|
|
277
|
+
obj2.creaTime.push(r.creaTime)
|
|
278
|
+
})
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+
lineDataArr[2].forEach(r=> {
|
|
283
|
+
obj3.pointArr.push([r.lng,r.lat])
|
|
284
|
+
obj3.creaTime.push(r.creaTime)
|
|
285
|
+
})
|
|
286
|
+
|
|
287
|
+
lineDataArr[3].forEach(r=> {
|
|
288
|
+
obj4.pointArr.push([r.lng,r.lat])
|
|
289
|
+
obj4.creaTime.push(r.creaTime)
|
|
290
|
+
})
|
|
291
|
+
|
|
292
|
+
lineDataArr[4].forEach(r=> {
|
|
293
|
+
obj5.pointArr.push([r.lng,r.lat])
|
|
294
|
+
obj5.creaTime.push(r.creaTime)
|
|
295
|
+
})
|
|
296
|
+
|
|
297
|
+
lineDataArr[5].forEach(r=> {
|
|
298
|
+
obj6.pointArr.push([r.lng,r.lat])
|
|
299
|
+
obj6.creaTime.push(r.creaTime)
|
|
300
|
+
})
|
|
301
|
+
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
setTimeout(r=> {
|
|
307
|
+
this.lineData1=obj2
|
|
308
|
+
},3000)
|
|
309
|
+
|
|
310
|
+
setTimeout(r=> {
|
|
311
|
+
this.lineData1=obj3
|
|
312
|
+
},4000)
|
|
313
|
+
|
|
314
|
+
|
|
315
|
+
setTimeout(r=> {
|
|
316
|
+
this.lineData1=obj4
|
|
317
|
+
},5000)
|
|
318
|
+
|
|
319
|
+
setTimeout(r=> {
|
|
320
|
+
this.lineData1=obj5
|
|
321
|
+
},6000)
|
|
322
|
+
|
|
323
|
+
|
|
324
|
+
|
|
325
|
+
setTimeout(r=> {
|
|
326
|
+
this.lineData1=obj6
|
|
327
|
+
|
|
328
|
+
},7000)
|
|
329
|
+
|
|
330
|
+
|
|
331
|
+
// obj6.forEach(r=> {
|
|
332
|
+
|
|
333
|
+
// });
|
|
334
|
+
// let i=0;
|
|
335
|
+
// setTimeout(r=> {
|
|
336
|
+
// let intId = setInterval(r=> {
|
|
337
|
+
// this.lineAppend= obj3.pointArr[i];
|
|
338
|
+
// console.log(this.lineAppend);
|
|
339
|
+
// i+=1;
|
|
340
|
+
// if(i==obj3.pointArr.length){
|
|
341
|
+
// clearInterval(intId);
|
|
342
|
+
// }
|
|
343
|
+
// },2000);
|
|
344
|
+
// },3000);
|
|
345
|
+
|
|
346
|
+
|
|
347
|
+
// setTimeout(r=> {
|
|
348
|
+
// this.lineData1=null;
|
|
349
|
+
// },10000);
|
|
350
|
+
|
|
351
|
+
|
|
352
|
+
// setTimeout(r=> {
|
|
353
|
+
// // this.lineData1=null;
|
|
354
|
+
// this.clearLiens=true;
|
|
355
|
+
// },10000);
|
|
356
|
+
|
|
357
|
+
// amworkdatalist.push({
|
|
358
|
+
// X,
|
|
359
|
+
// Y,
|
|
360
|
+
// isNJOpt: isWorking,
|
|
361
|
+
// creaTime: toDateString(new Date(item.creaTime))
|
|
362
|
+
// });
|
|
363
|
+
|
|
364
|
+
// {
|
|
365
|
+
// color: 'rgb(0,0,255)',
|
|
366
|
+
// width: 2,
|
|
367
|
+
// pointArr: [],
|
|
368
|
+
// zIndex: 1000,
|
|
369
|
+
// }
|
|
370
|
+
|
|
371
|
+
// console.log(polygonModel5);
|
|
372
|
+
// console.log(lineData1);
|
|
373
|
+
// console.log(lineData2);
|
|
374
|
+
|
|
375
|
+
// setTimeout(r=> {this.colors=['red','#000']},3000);
|
|
376
|
+
// setTimeout(r=> {this.isClear=true;}, 5000);
|
|
377
|
+
setTimeout(r => {
|
|
378
|
+
// this.modelArr= [polygonModel3,polygonModel4];
|
|
379
|
+
// this.polygonColorObj={
|
|
380
|
+
// id:'ceshi4',
|
|
381
|
+
// colorArr:['red','#000']
|
|
382
|
+
// };
|
|
383
|
+
|
|
384
|
+
// this.polygonColors.push({
|
|
385
|
+
// id:'ceshi1',
|
|
386
|
+
// colorArr:['red','#000']
|
|
387
|
+
// });
|
|
388
|
+
|
|
389
|
+
// this.polygonColors.push({
|
|
390
|
+
// id:'ceshi2',
|
|
391
|
+
// colorArr:['red','#000']
|
|
392
|
+
// });
|
|
393
|
+
|
|
394
|
+
// this.polygonColors.push({
|
|
395
|
+
// id:'ceshi3',
|
|
396
|
+
// colorArr:['red','#000']
|
|
397
|
+
// });
|
|
398
|
+
// this.insert=polygonModel1;
|
|
399
|
+
|
|
400
|
+
// this.isFit=true;
|
|
401
|
+
|
|
402
|
+
// this.range='ceshi3';
|
|
403
|
+
// this.ranges=['ceshi2','ceshi1'];
|
|
404
|
+
// :initModifyPolygon="geo"
|
|
405
|
+
// this.inserts=[polygonModel2, polygonModel3];
|
|
406
|
+
}, 8000)
|
|
407
|
+
setTimeout(r => {
|
|
408
|
+
// this.polygonModel={
|
|
409
|
+
// fillColor: '#000',
|
|
410
|
+
// stroke: 'red',
|
|
411
|
+
// width: 1,
|
|
412
|
+
// text: '测试',
|
|
413
|
+
// coordinates: geometry.coordinates,
|
|
414
|
+
// id: 'ceshi',
|
|
415
|
+
// };
|
|
416
|
+
// this.restFit = true;
|
|
417
|
+
// this.modelArr=[];
|
|
418
|
+
// this.isShowAll=false;
|
|
419
|
+
// this.showPolygons
|
|
420
|
+
|
|
421
|
+
// this.showPolygon={
|
|
422
|
+
// id:'ceshi2',
|
|
423
|
+
// isShow:false
|
|
424
|
+
// }
|
|
425
|
+
}, 7000)
|
|
426
|
+
// setTimeout(r=> {
|
|
427
|
+
// this.polygonModel={
|
|
428
|
+
// fillColor: '#000',
|
|
429
|
+
// stroke: '#fff',
|
|
430
|
+
// width: 4,
|
|
431
|
+
// text:'测试2',
|
|
432
|
+
// coordinates: [
|
|
433
|
+
// [
|
|
434
|
+
// [121.03623185250073, 29.247091764239528],
|
|
435
|
+
// [121.03525048300928, 29.24522364753245],
|
|
436
|
+
// [121.03576144393304, 29.244964111834967],
|
|
437
|
+
// [121.03598042717134, 29.245156060100488],
|
|
438
|
+
// [121.03797020112704, 29.24484786136949],
|
|
439
|
+
// [121.03804589913334, 29.244920855919766],
|
|
440
|
+
// [121.03816214959882, 29.244964111834967],
|
|
441
|
+
// [121.03859908998896, 29.245047209773205],
|
|
442
|
+
// [121.03870182296805, 29.245344594473835],
|
|
443
|
+
// [121.03883429416969, 29.245955584817516],
|
|
444
|
+
// [121.03876670673772, 29.24603128272069],
|
|
445
|
+
// [121.0388072591969, 29.246155643657374],
|
|
446
|
+
// [121.03868830548166, 29.246174568158953],
|
|
447
|
+
// [121.03868830548166, 29.246225934545365],
|
|
448
|
+
// [121.03834496140979, 29.24628270805009],
|
|
449
|
+
// [121.03827467031554, 29.246350295482053],
|
|
450
|
+
// [121.03814760602596, 29.24639895841244],
|
|
451
|
+
// [121.03822600728203, 29.246569278720354],
|
|
452
|
+
// [121.03623185250073, 29.247091764239528]
|
|
453
|
+
// ]
|
|
454
|
+
// ],
|
|
455
|
+
// id: 'ceshi',
|
|
456
|
+
// }
|
|
457
|
+
// },6000);
|
|
184
458
|
},
|
|
185
459
|
methods: {
|
|
460
|
+
trackPlayEvent(obj){
|
|
461
|
+
console.log(obj)
|
|
462
|
+
},
|
|
186
463
|
onShowPaly(b) {
|
|
187
|
-
this.isShowPaly = b
|
|
188
|
-
|
|
464
|
+
this.isShowPaly = b
|
|
189
465
|
},
|
|
190
466
|
load(obj) {
|
|
191
|
-
this.lMap = obj.mapServices
|
|
192
|
-
this.map = obj.map
|
|
467
|
+
this.lMap = obj.mapServices
|
|
468
|
+
this.map = obj.map
|
|
469
|
+
// console.log(obj);
|
|
470
|
+
// let g10 = GPS.convertGCJ02(gJson2);
|
|
471
|
+
// convertWGS84
|
|
472
|
+
// convertWGS84,convertGCJ02
|
|
473
|
+
// const geo = createPolygonBoundary(g5);
|
|
474
|
+
// this.map.addLayer(geo );
|
|
193
475
|
},
|
|
194
476
|
drawSuccess(obj) {
|
|
195
477
|
this.polygonModel = {
|
|
@@ -199,7 +481,7 @@
|
|
|
199
481
|
text: '',
|
|
200
482
|
geo: obj.geoJson,
|
|
201
483
|
id: 'ceshi',
|
|
202
|
-
}
|
|
484
|
+
}
|
|
203
485
|
},
|
|
204
486
|
drawError(obj) {},
|
|
205
487
|
mapClick(e) {
|
|
@@ -207,13 +489,14 @@
|
|
|
207
489
|
},
|
|
208
490
|
onLoad(e) {},
|
|
209
491
|
crossHairClick(e) {
|
|
210
|
-
|
|
492
|
+
// console.log(e);
|
|
211
493
|
},
|
|
212
494
|
mapMoveend(e) {
|
|
213
|
-
|
|
495
|
+
// alert(1);
|
|
496
|
+
// console.log(e);
|
|
214
497
|
},
|
|
215
498
|
loadDrawPolygonEvent(e) {
|
|
216
|
-
this.mapTool = e
|
|
499
|
+
this.mapTool = e
|
|
217
500
|
},
|
|
218
501
|
clusterCallback({
|
|
219
502
|
id,
|
|
@@ -223,30 +506,39 @@
|
|
|
223
506
|
this.showPolygon = {
|
|
224
507
|
id,
|
|
225
508
|
isShow
|
|
226
|
-
}
|
|
509
|
+
}
|
|
227
510
|
this.isCheckPoint = {
|
|
228
511
|
id,
|
|
229
512
|
isShow
|
|
230
|
-
}
|
|
231
|
-
}, 50)
|
|
513
|
+
}
|
|
514
|
+
}, 50)
|
|
232
515
|
},
|
|
233
516
|
changeSwitchMap(obj) {
|
|
234
517
|
if (obj.mapType == 2) {
|
|
235
|
-
this.gpsType = 0
|
|
236
|
-
return
|
|
518
|
+
this.gpsType = 0
|
|
519
|
+
return
|
|
237
520
|
}
|
|
238
|
-
this.gpsType = obj.mapType
|
|
521
|
+
this.gpsType = obj.mapType
|
|
239
522
|
},
|
|
240
523
|
onClick() {
|
|
241
|
-
this.
|
|
524
|
+
this.clearLiens=true;
|
|
242
525
|
},
|
|
243
|
-
|
|
244
|
-
|
|
526
|
+
onClick2() {
|
|
527
|
+
// this.isShowObj={
|
|
528
|
+
// id:'ceshi1',
|
|
529
|
+
// show:true,
|
|
530
|
+
// }
|
|
531
|
+
this.isStop=true;
|
|
532
|
+
// alert(this.isStop);
|
|
533
|
+
|
|
245
534
|
},
|
|
246
535
|
onClick3() {
|
|
247
|
-
|
|
536
|
+
// this.isShowObj={
|
|
537
|
+
// id:'ceshi1',
|
|
538
|
+
// show:false,
|
|
539
|
+
// }
|
|
540
|
+
this.isStop=false;
|
|
248
541
|
},
|
|
249
|
-
|
|
250
542
|
}
|
|
251
543
|
};
|
|
252
544
|
</script>
|