ry-vue-map 0.3.3 → 0.3.5

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.
@@ -1,30 +1,539 @@
1
1
  <template>
2
2
  <div class="map-style">
3
3
 
4
- <ry-map projection="EPSG:4326" :center="center" :zoom="15" :minZoom="1" :maxZoom="maxZoom" @load="load($event)"
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
10
  @loadDrawPolygonEvent="loadDrawPolygonEvent($event)" @changeSwitchMap="changeSwitchMap($event)"
11
- :isShowSwitchMap="true" @mapClick2="mapClick2($event)">
11
+ :isShowSwitchMap="true">
12
12
 
13
13
  <template #marker="{mapDto}">
14
14
 
15
- <!-- <ry-polygon-geo :isFit="true" :gpsType="gpsType" :map="mapDto.map" :model="polygonModel" :isStandardGeo="true" > </ry-polygon-geo> -->
16
- <!-- <RyKMLs v-if="kmlModels.length" :map="mapDto.map" :gpsType="gpsType" :modelArr="kmlModels" :isFit="true"
17
- :setColor="setColor" red="rykmls"></RyKMLs> -->
18
-
19
- <ry-static-layers :gpsType="gpsType" :map="mapDto.map" :modelArr="models" :isFit="true"></ry-static-layers>
15
+ <RyKMLs :isFit="true" :map="mapDto.map" :gpsType="1" :isShowAll="isShowAll" :modelArr="modelArr">
16
+ </RyKMLs>
17
+
20
18
  </template>
21
19
 
22
20
  </ry-map>
23
21
 
22
+ <button @click="onClick()">测试</button>
23
+ <button @click="onClick2()">测试2</button>
24
24
  </div>
25
25
  </template>
26
26
 
27
27
  <script>
28
+ const kmls = [{
29
+ "bbox": [
30
+ 121.4104575,
31
+ 28.51197733,
32
+ 121.41908267,
33
+ 28.51909733
34
+ ],
35
+ "id": 1493,
36
+ "workId": 28936,
37
+ "url": "https://zjtzlq.ryaims.com:9443/ryfiles/62/e7724139b9e549619380fffcc9bd3aa2.kml",
38
+ "gcj02Url": "https://zjtzlq.ryaims.com:9443/ryfiles/72/8cf8df2e71c2477dbbbd5c604c334017.kml",
39
+ "isShow": true
40
+ },
41
+ {
42
+ "bbox": [
43
+ 121.41074167,
44
+ 28.51146833,
45
+ 121.42425,
46
+ 28.51859667
47
+ ],
48
+ "id": 1512,
49
+ "workId": 28984,
50
+ "url": "https://zjtzlq.ryaims.com:9443/ryfiles/27/4d828cb291704c85aea8fa5f73001aeb.kml",
51
+ "gcj02Url": "https://zjtzlq.ryaims.com:9443/ryfiles/81/c7270ccda701492dadf01bf624267b6b.kml",
52
+ "isShowKML": true
53
+ },
54
+ {
55
+ "bbox": [
56
+ 121.40971583,
57
+ 28.5123525,
58
+ 121.41901633333333,
59
+ 28.51932867
60
+ ],
61
+ "id": 1513,
62
+ "workId": 28987,
63
+ "url": "https://zjtzlq.ryaims.com:9443/ryfiles/27/02b7e77c876c4fd088b6cbc664804454.kml",
64
+ "gcj02Url": "https://zjtzlq.ryaims.com:9443/ryfiles/16/87f7cebb75154076958b2293893b7afb.kml",
65
+ "isShowKML": true
66
+ },
67
+ {
68
+ "bbox": [
69
+ 121.41691817,
70
+ 28.51132567,
71
+ 121.4519795,
72
+ 28.53608783
73
+ ],
74
+ "id": 1423,
75
+ "workId": 28748,
76
+ "url": "https://zjtzlq.ryaims.com:9443/ryfiles/74/da85c28d5f864b4f8e521a151efd0c93.kml",
77
+ "gcj02Url": "https://zjtzlq.ryaims.com:9443/ryfiles/92/065f976768f3426da9458acbffdf0e8f.kml",
78
+ "isShowKML": true
79
+ },
80
+ {
81
+ "bbox": [
82
+ 121.41633383,
83
+ 28.51201433,
84
+ 121.41806933,
85
+ 28.512982
86
+ ],
87
+ "id": 1461,
88
+ "workId": 28863,
89
+ "url": "https://zjtzlq.ryaims.com:9443/ryfiles/57/00343fc18ffa45e6885fa718b8d9b85b.kml",
90
+ "gcj02Url": "https://zjtzlq.ryaims.com:9443/ryfiles/11/919f6b074fd44902b43aceecf7c336ab.kml",
91
+ "isShowKML": true
92
+ },
93
+ {
94
+ "bbox": [
95
+ 121.41746983,
96
+ 28.51167617,
97
+ 121.4185925,
98
+ 28.51333267
99
+ ],
100
+ "id": 1494,
101
+ "workId": 28937,
102
+ "url": "https://zjtzlq.ryaims.com:9443/ryfiles/74/8b6910f7e6724bbd87dc23d4ee2064f1.kml",
103
+ "gcj02Url": "https://zjtzlq.ryaims.com:9443/ryfiles/95/76e6388253304dbfb2c8e5e89e21d2b3.kml",
104
+ "isShowKML": true
105
+ },
106
+ {
107
+ "bbox": [
108
+ 121.42309333,
109
+ 28.51116,
110
+ 121.42547667,
111
+ 28.51217833
112
+ ],
113
+ "id": 1401,
114
+ "workId": 28671,
115
+ "url": "https://zjtzlq.ryaims.com:9443/ryfiles/77/2ea5c94441d24061a36156b1a03d405a.kml",
116
+ "gcj02Url": "https://zjtzlq.ryaims.com:9443/ryfiles/53/9743daa2a5184d09a26339f7cd8980ef.kml",
117
+ "isShowKML": true
118
+ },
119
+ {
120
+ "bbox": [
121
+ 121.42353567,
122
+ 28.51166283,
123
+ 121.4250625,
124
+ 28.51281217
125
+ ],
126
+ "id": 1402,
127
+ "workId": 28672,
128
+ "url": "https://zjtzlq.ryaims.com:9443/ryfiles/82/f032aee12be8433fbb8016cb108b6cca.kml",
129
+ "gcj02Url": "https://zjtzlq.ryaims.com:9443/ryfiles/11/10e00a4a2e044443a69df815dd852f1f.kml",
130
+ "isShowKML": true
131
+ },
132
+ {
133
+ "bbox": [
134
+ 121.42385567,
135
+ 28.51228183,
136
+ 121.4252195,
137
+ 28.51281717
138
+ ],
139
+ "id": 1406,
140
+ "workId": 28677,
141
+ "url": "https://zjtzlq.ryaims.com:9443/ryfiles/42/da6e8bfd2cd54583b4b62b88dedeaf9e.kml",
142
+ "gcj02Url": "https://zjtzlq.ryaims.com:9443/ryfiles/26/96e875c50e15493f9de79af5a10dbd93.kml",
143
+ "isShowKML": true
144
+ },
145
+ {
146
+ "bbox": [
147
+ 121.438025,
148
+ 28.55518667,
149
+ 121.439475,
150
+ 28.55667333
151
+ ],
152
+ "id": 2110,
153
+ "workId": 30891,
154
+ "url": "https://zjtzlq.ryaims.com:9443/ryfiles/42/fca9d06776a54fecbb5ad3bd8014ed52.kml",
155
+ "gcj02Url": "https://zjtzlq.ryaims.com:9443/ryfiles/81/76921c16298c404390ef6d756c46f606.kml",
156
+ "isShowKML": true
157
+ },
158
+ {
159
+ "bbox": [
160
+ 121.4233605,
161
+ 28.51097133,
162
+ 121.42523633,
163
+ 28.51277233
164
+ ],
165
+ "id": 1426,
166
+ "workId": 28752,
167
+ "url": "https://zjtzlq.ryaims.com:9443/ryfiles/39/debc2d90eca74ad692be021f594d95c0.kml",
168
+ "gcj02Url": "https://zjtzlq.ryaims.com:9443/ryfiles/90/170ed7f40f444beab514a1c28700e03c.kml",
169
+ "isShowKML": true
170
+ },
171
+ {
172
+ "bbox": [
173
+ 121.43823167,
174
+ 28.55486333,
175
+ 121.43946167,
176
+ 28.55606
177
+ ],
178
+ "id": 2111,
179
+ "workId": 30892,
180
+ "url": "https://zjtzlq.ryaims.com:9443/ryfiles/36/6c2d338af658496da6ac852ebf2a794e.kml",
181
+ "gcj02Url": "https://zjtzlq.ryaims.com:9443/ryfiles/12/00d2828f2cd8428982322ab57d5dc8eb.kml",
182
+ "isShowKML": true
183
+ },
184
+ {
185
+ "bbox": [
186
+ 121.438295,
187
+ 28.555005,
188
+ 121.44158667,
189
+ 28.563075
190
+ ],
191
+ "id": 801,
192
+ "workId": 25659,
193
+ "url": "https://zjtzlq.ryaims.com:9443/ryfiles/34/091cdc21ea254571ab1457204bf5ca29.kml",
194
+ "gcj02Url": "https://zjtzlq.ryaims.com:9443/ryfiles/45/723c656d167f47e5a28e29932177611a.kml",
195
+ "isShowKML": true
196
+ },
197
+ {
198
+ "bbox": [
199
+ 121.42835,
200
+ 28.554515,
201
+ 121.44021833,
202
+ 28.55725167
203
+ ],
204
+ "id": 2115,
205
+ "workId": 30918,
206
+ "url": "https://zjtzlq.ryaims.com:9443/ryfiles/51/6b9db6521ac245569af5bd5ab7575f97.kml",
207
+ "gcj02Url": "https://zjtzlq.ryaims.com:9443/ryfiles/67/8b5cc17ee24843e299975929b5fef329.kml",
208
+ "isShowKML": true
209
+ },
210
+ {
211
+ "bbox": [
212
+ 121.42944667,
213
+ 28.55448833,
214
+ 121.44033167,
215
+ 28.556685
216
+ ],
217
+ "id": 2116,
218
+ "workId": 30919,
219
+ "url": "https://zjtzlq.ryaims.com:9443/ryfiles/7/cc5e7f0905aa4898961c04b6363de8c5.kml",
220
+ "gcj02Url": "https://zjtzlq.ryaims.com:9443/ryfiles/4/0469ccc835ea453fbce57443c4abc576.kml",
221
+ "isShowKML": true
222
+ },
223
+ {
224
+ "bbox": [
225
+ 121.43667,
226
+ 28.55033667,
227
+ 121.44324167,
228
+ 28.55759167
229
+ ],
230
+ "id": 2194,
231
+ "workId": 31201,
232
+ "url": "https://zjtzlq.ryaims.com:9443/ryfiles/38/d933af70777646cab912492982a259aa.kml",
233
+ "gcj02Url": "https://zjtzlq.ryaims.com:9443/ryfiles/13/47a24e13be7446e8a1aa1122aabe426b.kml",
234
+ "isShowKML": true
235
+ },
236
+ {
237
+ "bbox": [
238
+ 121.4371,
239
+ 28.550345,
240
+ 121.44327167,
241
+ 28.55778167
242
+ ],
243
+ "id": 2200,
244
+ "workId": 31215,
245
+ "url": "https://zjtzlq.ryaims.com:9443/ryfiles/0/d62b5f4716914ebda34cdf7bd3e1f68b.kml",
246
+ "gcj02Url": "https://zjtzlq.ryaims.com:9443/ryfiles/60/a0800bc2602849708f236ad1b8b0c5bf.kml",
247
+ "isShowKML": true
248
+ },
249
+ {
250
+ "bbox": [
251
+ 121.43701333,
252
+ 28.555465,
253
+ 121.43904667,
254
+ 28.556615
255
+ ],
256
+ "id": 2103,
257
+ "workId": 30863,
258
+ "url": "https://zjtzlq.ryaims.com:9443/ryfiles/19/229a8bf89c8147a6af3ffb5b72cb8fc4.kml",
259
+ "gcj02Url": "https://zjtzlq.ryaims.com:9443/ryfiles/68/e371a45dc28746e6a268085889085c49.kml",
260
+ "isShowKML": true
261
+ },
262
+ {
263
+ "bbox": [
264
+ 121.43589833,
265
+ 28.555655,
266
+ 121.43892833,
267
+ 28.55835
268
+ ],
269
+ "id": 764,
270
+ "workId": 25452,
271
+ "url": "https://zjtzlq.ryaims.com:9443/ryfiles/53/f88aa9b11b514e18abe8bc32b3fd23ac.kml",
272
+ "gcj02Url": "https://zjtzlq.ryaims.com:9443/ryfiles/68/7e4247a294e54dd0a02ebd955d61d7d6.kml",
273
+ "isShowKML": true
274
+ },
275
+ {
276
+ "bbox": [
277
+ 121.43799833,
278
+ 28.55496833,
279
+ 121.43978333,
280
+ 28.55778333
281
+ ],
282
+ "id": 783,
283
+ "workId": 25533,
284
+ "url": "https://zjtzlq.ryaims.com:9443/ryfiles/74/e9e3bddbc0c44715a6ab6793f73343bc.kml",
285
+ "gcj02Url": "https://zjtzlq.ryaims.com:9443/ryfiles/56/10fec57783de4e2099a0f366e3e270c5.kml",
286
+ "isShowKML": true
287
+ },
288
+ {
289
+ "bbox": [
290
+ 121.4104575,
291
+ 28.51197733,
292
+ 121.41908267,
293
+ 28.51909733
294
+ ],
295
+ "id": 1493,
296
+ "workId": 28936,
297
+ "url": "https://zjtzlq.ryaims.com:9443/ryfiles/62/e7724139b9e549619380fffcc9bd3aa2.kml",
298
+ "gcj02Url": "https://zjtzlq.ryaims.com:9443/ryfiles/72/8cf8df2e71c2477dbbbd5c604c334017.kml",
299
+ "isShowKML": true
300
+ },
301
+ {
302
+ "bbox": [
303
+ 121.40971583,
304
+ 28.5123525,
305
+ 121.41901633333333,
306
+ 28.51932867
307
+ ],
308
+ "id": 1513,
309
+ "workId": 28987,
310
+ "url": "https://zjtzlq.ryaims.com:9443/ryfiles/27/02b7e77c876c4fd088b6cbc664804454.kml",
311
+ "gcj02Url": "https://zjtzlq.ryaims.com:9443/ryfiles/16/87f7cebb75154076958b2293893b7afb.kml",
312
+ "isShowKML": true
313
+ },
314
+ {
315
+ "bbox": [
316
+ 121.41633383,
317
+ 28.51201433,
318
+ 121.41806933,
319
+ 28.512982
320
+ ],
321
+ "id": 1461,
322
+ "workId": 28863,
323
+ "url": "https://zjtzlq.ryaims.com:9443/ryfiles/57/00343fc18ffa45e6885fa718b8d9b85b.kml",
324
+ "gcj02Url": "https://zjtzlq.ryaims.com:9443/ryfiles/11/919f6b074fd44902b43aceecf7c336ab.kml",
325
+ "isShowKML": true
326
+ },
327
+ {
328
+ "bbox": [
329
+ 121.41746983,
330
+ 28.51167617,
331
+ 121.4185925,
332
+ 28.51333267
333
+ ],
334
+ "id": 1494,
335
+ "workId": 28937,
336
+ "url": "https://zjtzlq.ryaims.com:9443/ryfiles/74/8b6910f7e6724bbd87dc23d4ee2064f1.kml",
337
+ "gcj02Url": "https://zjtzlq.ryaims.com:9443/ryfiles/95/76e6388253304dbfb2c8e5e89e21d2b3.kml",
338
+ "isShowKML": true
339
+ },
340
+ {
341
+ "bbox": [
342
+ 121.42353567,
343
+ 28.51166283,
344
+ 121.4250625,
345
+ 28.51281217
346
+ ],
347
+ "id": 1402,
348
+ "workId": 28672,
349
+ "url": "https://zjtzlq.ryaims.com:9443/ryfiles/82/f032aee12be8433fbb8016cb108b6cca.kml",
350
+ "gcj02Url": "https://zjtzlq.ryaims.com:9443/ryfiles/11/10e00a4a2e044443a69df815dd852f1f.kml",
351
+ "isShowKML": true
352
+ },
353
+ {
354
+ "bbox": [
355
+ 121.41691817,
356
+ 28.51132567,
357
+ 121.4519795,
358
+ 28.53608783
359
+ ],
360
+ "id": 1423,
361
+ "workId": 28748,
362
+ "url": "https://zjtzlq.ryaims.com:9443/ryfiles/74/da85c28d5f864b4f8e521a151efd0c93.kml",
363
+ "gcj02Url": "https://zjtzlq.ryaims.com:9443/ryfiles/92/065f976768f3426da9458acbffdf0e8f.kml",
364
+ "isShowKML": true
365
+ },
366
+ {
367
+ "bbox": [
368
+ 121.42309333,
369
+ 28.51116,
370
+ 121.42547667,
371
+ 28.51217833
372
+ ],
373
+ "id": 1401,
374
+ "workId": 28671,
375
+ "url": "https://zjtzlq.ryaims.com:9443/ryfiles/77/2ea5c94441d24061a36156b1a03d405a.kml",
376
+ "gcj02Url": "https://zjtzlq.ryaims.com:9443/ryfiles/53/9743daa2a5184d09a26339f7cd8980ef.kml",
377
+ "isShowKML": true
378
+ },
379
+ {
380
+ "bbox": [
381
+ 121.42385567,
382
+ 28.51228183,
383
+ 121.4252195,
384
+ 28.51281717
385
+ ],
386
+ "id": 1406,
387
+ "workId": 28677,
388
+ "url": "https://zjtzlq.ryaims.com:9443/ryfiles/42/da6e8bfd2cd54583b4b62b88dedeaf9e.kml",
389
+ "gcj02Url": "https://zjtzlq.ryaims.com:9443/ryfiles/26/96e875c50e15493f9de79af5a10dbd93.kml",
390
+ "isShowKML": true
391
+ },
392
+ {
393
+ "bbox": [
394
+ 121.4233605,
395
+ 28.51097133,
396
+ 121.42523633,
397
+ 28.51277233
398
+ ],
399
+ "id": 1426,
400
+ "workId": 28752,
401
+ "url": "https://zjtzlq.ryaims.com:9443/ryfiles/39/debc2d90eca74ad692be021f594d95c0.kml",
402
+ "gcj02Url": "https://zjtzlq.ryaims.com:9443/ryfiles/90/170ed7f40f444beab514a1c28700e03c.kml",
403
+ "isShowKML": true
404
+ },
405
+ {
406
+ "bbox": [
407
+ 121.43823167,
408
+ 28.55486333,
409
+ 121.43946167,
410
+ 28.55606
411
+ ],
412
+ "id": 2111,
413
+ "workId": 30892,
414
+ "url": "https://zjtzlq.ryaims.com:9443/ryfiles/36/6c2d338af658496da6ac852ebf2a794e.kml",
415
+ "gcj02Url": "https://zjtzlq.ryaims.com:9443/ryfiles/12/00d2828f2cd8428982322ab57d5dc8eb.kml",
416
+ "isShowKML": true
417
+ },
418
+ {
419
+ "bbox": [
420
+ 121.438295,
421
+ 28.555005,
422
+ 121.44158667,
423
+ 28.563075
424
+ ],
425
+ "id": 801,
426
+ "workId": 25659,
427
+ "url": "https://zjtzlq.ryaims.com:9443/ryfiles/34/091cdc21ea254571ab1457204bf5ca29.kml",
428
+ "gcj02Url": "https://zjtzlq.ryaims.com:9443/ryfiles/45/723c656d167f47e5a28e29932177611a.kml",
429
+ "isShowKML": true
430
+ },
431
+ {
432
+ "bbox": [
433
+ 121.43667,
434
+ 28.55033667,
435
+ 121.44324167,
436
+ 28.55759167
437
+ ],
438
+ "id": 2194,
439
+ "workId": 31201,
440
+ "url": "https://zjtzlq.ryaims.com:9443/ryfiles/38/d933af70777646cab912492982a259aa.kml",
441
+ "gcj02Url": "https://zjtzlq.ryaims.com:9443/ryfiles/13/47a24e13be7446e8a1aa1122aabe426b.kml",
442
+ "isShowKML": true
443
+ },
444
+ {
445
+ "bbox": [
446
+ 121.43799833,
447
+ 28.55496833,
448
+ 121.43978333,
449
+ 28.55778333
450
+ ],
451
+ "id": 783,
452
+ "workId": 25533,
453
+ "url": "https://zjtzlq.ryaims.com:9443/ryfiles/74/e9e3bddbc0c44715a6ab6793f73343bc.kml",
454
+ "gcj02Url": "https://zjtzlq.ryaims.com:9443/ryfiles/56/10fec57783de4e2099a0f366e3e270c5.kml",
455
+ "isShowKML": true
456
+ },
457
+ {
458
+ "bbox": [
459
+ 121.4104575,
460
+ 28.51197733,
461
+ 121.41908267,
462
+ 28.51909733
463
+ ],
464
+ "id": 1493,
465
+ "workId": 28936,
466
+ "url": "https://zjtzlq.ryaims.com:9443/ryfiles/62/e7724139b9e549619380fffcc9bd3aa2.kml",
467
+ "gcj02Url": "https://zjtzlq.ryaims.com:9443/ryfiles/72/8cf8df2e71c2477dbbbd5c604c334017.kml",
468
+ "isShowKML": true
469
+ },
470
+ {
471
+ "bbox": [
472
+ 121.41633383,
473
+ 28.51201433,
474
+ 121.41806933,
475
+ 28.512982
476
+ ],
477
+ "id": 1461,
478
+ "workId": 28863,
479
+ "url": "https://zjtzlq.ryaims.com:9443/ryfiles/57/00343fc18ffa45e6885fa718b8d9b85b.kml",
480
+ "gcj02Url": "https://zjtzlq.ryaims.com:9443/ryfiles/11/919f6b074fd44902b43aceecf7c336ab.kml",
481
+ "isShowKML": true
482
+ },
483
+ {
484
+ "bbox": [
485
+ 121.42309333,
486
+ 28.51116,
487
+ 121.42547667,
488
+ 28.51217833
489
+ ],
490
+ "id": 1401,
491
+ "workId": 28671,
492
+ "url": "https://zjtzlq.ryaims.com:9443/ryfiles/77/2ea5c94441d24061a36156b1a03d405a.kml",
493
+ "gcj02Url": "https://zjtzlq.ryaims.com:9443/ryfiles/53/9743daa2a5184d09a26339f7cd8980ef.kml",
494
+ "isShowKML": true
495
+ },
496
+ {
497
+ "bbox": [
498
+ 121.41691817,
499
+ 28.51132567,
500
+ 121.4519795,
501
+ 28.53608783
502
+ ],
503
+ "id": 1423,
504
+ "workId": 28748,
505
+ "url": "https://zjtzlq.ryaims.com:9443/ryfiles/74/da85c28d5f864b4f8e521a151efd0c93.kml",
506
+ "gcj02Url": "https://zjtzlq.ryaims.com:9443/ryfiles/92/065f976768f3426da9458acbffdf0e8f.kml",
507
+ "isShowKML": true
508
+ },
509
+ {
510
+ "bbox": [
511
+ 121.41746983,
512
+ 28.51167617,
513
+ 121.4185925,
514
+ 28.51333267
515
+ ],
516
+ "id": 1494,
517
+ "workId": 28937,
518
+ "url": "https://zjtzlq.ryaims.com:9443/ryfiles/74/8b6910f7e6724bbd87dc23d4ee2064f1.kml",
519
+ "gcj02Url": "https://zjtzlq.ryaims.com:9443/ryfiles/95/76e6388253304dbfb2c8e5e89e21d2b3.kml",
520
+ "isShowKML": true
521
+ },
522
+ {
523
+ "bbox": [
524
+ 121.4233605,
525
+ 28.51097133,
526
+ 121.42523633,
527
+ 28.51277233
528
+ ],
529
+ "id": 1426,
530
+ "workId": 28752,
531
+ "url": "https://zjtzlq.ryaims.com:9443/ryfiles/39/debc2d90eca74ad692be021f594d95c0.kml",
532
+ "gcj02Url": "https://zjtzlq.ryaims.com:9443/ryfiles/90/170ed7f40f444beab514a1c28700e03c.kml",
533
+ "isShowKML": true
534
+ }
535
+ ];
536
+
28
537
  import dayjs from 'dayjs'
29
538
  import RyMap from '@/components/maps/ryMap/src/index.vue';
30
539
  import RyMapTool from '@/components/maps/ryMapTool/src/index.vue';
@@ -32,29 +541,12 @@
32
541
  import RyPolygons from '@/components/maps/ryPolygons/src/index.vue';
33
542
  import RyClustersMarker from '@/components/maps/ryClustersMarker/src/index.vue';
34
543
  import RyPolygonGeo from '@/components/maps/ryPolygonGeo/src/index.vue';
35
- import geo from './ceshijson';
544
+ import RyLines from '@/components/maps/ryLines/src/index.vue';
36
545
  import RyKMLs from '@/components/maps/ryKMLs/src/index.vue';
37
- import urls from './imgUrl';
38
- import RyStaticLayers from '@/components/maps/ryStaticLayers/src/index.vue';
39
546
  import {
40
547
  createPolygonBoundary,
41
- GPS,
42
- getLngAndLatMaxMin
548
+ GPS
43
549
  } from "ry-map";
44
- const polygonModel = {
45
- fillColor: 'transparent',
46
- stroke: '#F7B500',
47
- strokeWidth: 3,
48
- lineDash: [1, 2, 3, 4, 5, 6],
49
- geo: geo,
50
- id: 'ceshi5',
51
- };
52
-
53
- import {
54
- getCenter,
55
- getHeight,
56
- getWidth
57
- } from 'ol/extent';
58
550
 
59
551
  export default {
60
552
  components: {
@@ -64,8 +556,7 @@
64
556
  RyPolygons,
65
557
  RyClustersMarker,
66
558
  RyPolygonGeo,
67
- RyKMLs,
68
- RyStaticLayers
559
+ RyKMLs
69
560
  },
70
561
  data() {
71
562
  return {
@@ -76,7 +567,8 @@
76
567
  isClear: false,
77
568
  geoJson: null,
78
569
  colors: [],
79
- center: [121.28732413948202, 28.645057235065444],
570
+ modelArr: [],
571
+ center: [120.2687149, 29.8142052],
80
572
  polygonColors: [],
81
573
  remove: 'ceshi1',
82
574
  removes: [],
@@ -93,109 +585,61 @@
93
585
  inserts: [],
94
586
  isShowAll: false,
95
587
  // isShow:true,
96
- polygonModel: polygonModel,
588
+ polygonModel: null,
97
589
  mapTool: null,
98
590
  isCheckPoint: null,
99
- gpsType: 1,
591
+ gpsType: 0,
100
592
  isRyMapTool: true,
101
593
  maxZoom: 18,
102
594
  src: require("@/assets/1.png"),
103
- layerArr: [1, 2],
104
- kmlModels: [],
105
- setColor: null,
106
- models:[],
595
+ lineData1: null,
596
+ lineData2: null,
597
+ clearLiens: false,
598
+ // startMarkerDto:null,
599
+ // endMarkerDto:null,
600
+ startMarkerDto: {
601
+ url: require('@/assets/startpoint.png'),
602
+ height: 23,
603
+ offset: [8, -11],
604
+ width: 28
605
+ },
606
+ endMarkerDto: {
607
+ url: require('@/assets/stoppoint.png'),
608
+ height: 16,
609
+ offset: [0, -8],
610
+ width: 16
611
+ },
612
+ lineAppend: [],
613
+ isShowPaly: true,
614
+ layerArr: [2, 2],
107
615
  };
108
616
  },
109
617
  created() {
110
- console.log(urls);
111
- setTimeout(r => {
112
- this.models=[urls[0]];
113
- this.bbox=this.models[1].bbox;
114
- },3000);
115
- // setTimeout(r => {
116
- // this.kmlModels = [{
117
- // "bbox": [
118
- // 120.063902,
119
- // 30.860046,
120
- // 120.064164,
121
- // 30.860164,
122
- // "id": 1869,
123
- // "url":
124
- // "https://rydemo.ryaims.com:9443/ryfiles/81/b8c2429815344596ada3767f1668c438.kml",
125
- // "gcj02Url":
126
- // "https://rydemo.ryaims.com:9443/ryfiles/31/aed50d22cc6d4093b212184854f5b6ea.kml",
127
- // "width": "2",
128
- // "extractStyles": false,
129
- // "stroke": "rgb(6,108,211)",
130
- // "fillColor": "rgb(6,108,211)"
131
- // },
132
- // {
133
- // "bbox": [
134
- // 120.063138,
135
- // 30.858118,
136
- // 120.064633,
137
- // 30.859334
138
- // ],
139
- // "id": 1871,
140
- // "url": "https://rydemo.ryaims.com:9443/ryfiles/33/66f97d83f0e546b09c711abb4e1173e1.kml",
141
- // "gcj02Url": "https://rydemo.ryaims.com:9443/ryfiles/40/9eb63a47aba545f098139856bcbfd0a4.kml",
142
- // "width": "2",
143
- // "extractStyles": false,
144
- // "stroke": "rgb(12,217,166)",
145
- // "fillColor": "rgb(12,217,166)"
146
- // }
147
- // ];
148
- // }, 3000);
149
-
150
- // setTimeout(r => {
151
- // this.setColor = {
152
- // id: 1869,
153
- // color: '#000'
154
- // }
155
- // }, 5000);
156
-
157
- // setTimeout(r => {
158
- // this.setColor = {
159
- // id: 1871,
160
- // color: '#000'
161
- // }
162
- // }, 6000);
163
-
164
618
 
165
- // setTimeout(r=> {
166
- // this.$$refs.rykmls.setFit();
167
- // },8000);
168
619
 
169
620
  },
170
621
  methods: {
171
622
  onShowPaly(b) {
172
623
  this.isShowPaly = b;
624
+
173
625
  },
174
626
  load(obj) {
175
627
  this.lMap = obj.mapServices;
176
628
  this.map = obj.map;
177
- // const geo2 = createPolygonBoundary(geo);
178
- // this.map.addLayer(geo2 );
179
-
180
- // console.log(geo2.getSource().getExtent());
181
- },
182
- getExtent() {
183
- const geometry = this.getGeometry();
184
- return geometry.getExtent();
629
+ this.modelArr = kmls;
185
630
  },
186
631
  drawSuccess(obj) {
187
- // this.polygonModel = {
188
- // fillColor: '#000',
189
- // stroke: '#fff',
190
- // width: 4,
191
- // text: '',
192
- // geo: obj.geoJson,
193
- // id: 'ceshi',
194
- // };
632
+ this.polygonModel = {
633
+ fillColor: '#000',
634
+ stroke: '#fff',
635
+ width: 4,
636
+ text: '',
637
+ geo: obj.geoJson,
638
+ id: 'ceshi',
639
+ };
195
640
  },
196
641
  drawError(obj) {},
197
642
  mapClick(e) {
198
- console.log(e);
199
643
  // alert(e);
200
644
  },
201
645
  onLoad(e) {},
@@ -203,9 +647,8 @@
203
647
  // console.log(e);
204
648
  },
205
649
  mapMoveend(e) {
206
-
207
650
  // alert(1);
208
- console.log(e);
651
+ // console.log(e);
209
652
  },
210
653
  loadDrawPolygonEvent(e) {
211
654
  this.mapTool = e;
@@ -233,20 +676,15 @@
233
676
  this.gpsType = obj.mapType;
234
677
  },
235
678
  onClick() {
236
- this.isRyMapTool = !this.isRyMapTool;
679
+ this.isShowAll=true;
237
680
  },
238
681
  onClick2() {
239
- this.maxZoom = 28;
682
+ this.isShowAll=false;
683
+ // this.maxZoom = 28;
240
684
  },
241
685
  onClick3() {
242
- this.maxZoom = 10;
686
+ // this.maxZoom = 10;
243
687
  },
244
- mapClick2(feature) {
245
- alert(1);
246
-
247
- // feature.get('ZLDWMC');
248
- console.log(feature.get('name'));
249
- }
250
688
 
251
689
  }
252
690
  };