ry-vue-map 0.0.2 → 0.0.4
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 +42966 -43261
- package/lib/ryui.common.js.gz +0 -0
- package/lib/ryui.css +1 -1
- package/lib/ryui.umd.js +42966 -43261
- package/lib/ryui.umd.js.gz +0 -0
- package/lib/ryui.umd.min.js +6 -2
- package/lib/ryui.umd.min.js.gz +0 -0
- package/package.json +2 -2
- package/src/components/maps/models/ryMap/map.js +5 -0
- package/src/components/maps/ryCrossHair/src/index.vue +66 -35
- package/src/components/maps/ryMap/src/index.vue +7 -3
- package/src/components/maps/ryMapTool/src/index.vue +2 -3
- package/src/components/maps/ryPolygon/src/index.vue +1 -1
- package/src/components/maps/switchMap/src/newIndex.vue +3 -0
- package/src/utils/lMapServices.js +6 -0
- package/src/views/map/3301.js +96828 -0
- package/src/views/map/331123.js +4736 -0
- package/src/views/map/index.vue +36 -16
package/src/views/map/index.vue
CHANGED
|
@@ -2,21 +2,20 @@
|
|
|
2
2
|
<div class="map-style">
|
|
3
3
|
|
|
4
4
|
<ry-map
|
|
5
|
+
|
|
5
6
|
projection="EPSG:4326"
|
|
6
|
-
:mapType="0"
|
|
7
|
-
:layerType="2"
|
|
8
7
|
:zoom="15"
|
|
9
8
|
:minZoom="1"
|
|
10
9
|
:maxZoom="18"
|
|
11
10
|
:center="center"
|
|
12
11
|
@load="load($event)"
|
|
13
|
-
:isCrossHair="
|
|
12
|
+
:isCrossHair="isRyMapTool"
|
|
14
13
|
:isRight="true"
|
|
15
14
|
:isRyMapTool="true"
|
|
16
15
|
@drawSuccess="drawSuccess"
|
|
17
16
|
@drawError="drawError"
|
|
18
17
|
:isShowRangingTool="true"
|
|
19
|
-
:isShowDrawTool="
|
|
18
|
+
:isShowDrawTool="isRyMapTool"
|
|
20
19
|
:bindMapClick="true"
|
|
21
20
|
@mapClick="mapClick($event)"
|
|
22
21
|
@crossHairClick="crossHairClick($event)"
|
|
@@ -25,11 +24,13 @@
|
|
|
25
24
|
:switchMapPosTop = '60'
|
|
26
25
|
:switchMapPosLeftOrRight="20"
|
|
27
26
|
:switchMapHeight="40"
|
|
28
|
-
|
|
27
|
+
:switchMapDefaultTypeOrLayer="[1,2]"
|
|
29
28
|
@mapMoveend="mapMoveend($event)"
|
|
30
29
|
@loadDrawPolygonEvent="loadDrawPolygonEvent($event)"
|
|
31
30
|
:initModifyPolygon="geoJson"
|
|
32
31
|
@changeSwitchMap="changeSwitchMap($event)"
|
|
32
|
+
:isShowSwitchMap="false"
|
|
33
|
+
|
|
33
34
|
>
|
|
34
35
|
<!-- <template slot="maptool">
|
|
35
36
|
<button>ry</button>
|
|
@@ -41,7 +42,8 @@
|
|
|
41
42
|
:hideSave="true"
|
|
42
43
|
:hideLine="true"
|
|
43
44
|
:hideArea="true" -->
|
|
44
|
-
|
|
45
|
+
<!-- :layerType="2"
|
|
46
|
+
:mapType="1" -->
|
|
45
47
|
<template #polygon="{mapDto}">
|
|
46
48
|
<!-- <ry-polygon :map="mapDto.map" :isShow="true" :polygonColor="colors" :model="polygonModel" :clear="isClear" @onLoad="onLoad($event)"></ry-polygon> -->
|
|
47
49
|
<ry-polygon :isFit="false" :gpsType="gpsType" :map="mapDto.map" :model="polygonModel" ></ry-polygon>
|
|
@@ -93,16 +95,21 @@
|
|
|
93
95
|
<button>ry</button>
|
|
94
96
|
</template>
|
|
95
97
|
</RyMapTool> -->
|
|
96
|
-
|
|
98
|
+
<button @click="onClick()">测试</button>
|
|
97
99
|
</div>
|
|
98
100
|
</template>
|
|
99
101
|
|
|
100
102
|
<script>
|
|
101
103
|
import RyMap from '@/components/maps/ryMap/src/index.vue';
|
|
102
104
|
import RyMapTool from '@/components/maps/ryMapTool/src/index.vue';
|
|
103
|
-
|
|
105
|
+
import RyPolygon from '@/components/maps/ryPolygon/src/index.vue';
|
|
104
106
|
import RyPolygons from '@/components/maps/ryPolygons/src/index.vue';
|
|
105
|
-
|
|
107
|
+
import RyClusters from '@/components/maps/ryClusters/src/index.vue';
|
|
108
|
+
import gJson from './3301';
|
|
109
|
+
import gJson2 from "./331123";
|
|
110
|
+
import { createPolygonBoundary,GPS } from "ry-map";
|
|
111
|
+
// import { convertWGS84,convertGCJ02 } from "ry-map/src/lzh";
|
|
112
|
+
|
|
106
113
|
const g1 =
|
|
107
114
|
"{\"type\":\"Feature\",\"bbox\":[120.15521468766134,30.17913,120.15548537675164,30.179627590685214],\"geometry\":{\"type\":\"Polygon\",\"coordinates\":[[[120.15521468766134,30.17961706012091],[120.155403,30.17913],[120.15548537675164,30.179627590685214],[120.15521468766134,30.17961706012091]]]},\"properties\":{\"perimeter\":139.0,\"squaremeter\":715.18,\"mu\":1.07,\"center\":[120.15535003220648,30.179378795342608],\"areacode\":\"3301\",\"geohash\":\"wtm7wj\",\"extend\":null}}";
|
|
108
115
|
const g2 =
|
|
@@ -194,10 +201,13 @@
|
|
|
194
201
|
id: 'ceshis',
|
|
195
202
|
isShow: false,
|
|
196
203
|
},
|
|
197
|
-
gpsType:
|
|
204
|
+
gpsType:0,
|
|
205
|
+
isRyMapTool:true,
|
|
198
206
|
};
|
|
199
207
|
},
|
|
200
208
|
created() {
|
|
209
|
+
|
|
210
|
+
|
|
201
211
|
this.geoJson = JSON.parse(g1);
|
|
202
212
|
// setTimeout(r=> {this.colors=['red','#000']},3000);
|
|
203
213
|
// setTimeout(r=> {this.isClear=true;}, 5000);
|
|
@@ -285,18 +295,26 @@
|
|
|
285
295
|
},
|
|
286
296
|
methods: {
|
|
287
297
|
load(obj) {
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
298
|
+
this.lMap = obj.mapServices;
|
|
299
|
+
this.map = obj.map;
|
|
300
|
+
// let g10 = GPS.convertGCJ02(gJson2);
|
|
301
|
+
// convertWGS84
|
|
302
|
+
// convertWGS84,convertGCJ02
|
|
303
|
+
const geo = createPolygonBoundary(gJson2);
|
|
304
|
+
this.map.addLayer(geo );
|
|
305
|
+
},
|
|
291
306
|
drawSuccess(obj) {
|
|
307
|
+
// alert(this.gpsType);
|
|
308
|
+
|
|
292
309
|
this.polygonModel={
|
|
293
310
|
fillColor: '#000',
|
|
294
311
|
stroke: '#fff',
|
|
295
312
|
width: 4,
|
|
296
|
-
text:'
|
|
313
|
+
text:'',
|
|
297
314
|
geo:obj.geoJson,
|
|
298
315
|
id: 'ceshi',
|
|
299
316
|
};
|
|
317
|
+
// setTimeout(r=> this.gpsType=1,10);
|
|
300
318
|
},
|
|
301
319
|
drawError(obj) {
|
|
302
320
|
},
|
|
@@ -321,13 +339,15 @@
|
|
|
321
339
|
},50);
|
|
322
340
|
},
|
|
323
341
|
changeSwitchMap(obj){
|
|
324
|
-
|
|
325
342
|
if(obj.mapType==2){
|
|
326
343
|
this.gpsType=0;
|
|
327
344
|
return;
|
|
328
345
|
}
|
|
329
346
|
this.gpsType=obj.mapType;
|
|
330
|
-
}
|
|
347
|
+
},
|
|
348
|
+
onClick(){
|
|
349
|
+
this.isRyMapTool=!this.isRyMapTool;
|
|
350
|
+
}
|
|
331
351
|
}
|
|
332
352
|
};
|
|
333
353
|
</script>
|