ry-vue-map 0.4.2 → 0.4.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.
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ry-vue-map",
3
- "version": "0.4.2",
3
+ "version": "0.4.4",
4
4
  "private": false,
5
5
  "main": "lib/ryui.umd.min.js",
6
6
  "description": "ry公共组件库",
@@ -169,7 +169,7 @@
169
169
 
170
170
  callback: (map, layers) => {
171
171
  this.map = map;
172
-
172
+
173
173
  if (this.bbox.length > 0) {
174
174
  this.setFit(this.bbox);
175
175
  }
@@ -139,8 +139,8 @@
139
139
  color,
140
140
  lineDash
141
141
  });
142
- this._bingMapEvent();
143
-
142
+ this._bingMapEvent();
143
+ this._bingMapMoveend();
144
144
  this.$emit('load', {
145
145
  map,
146
146
  mapServices: this.lMap,
@@ -1,7 +1,7 @@
1
- import RyKMLs from './src/index';
1
+ import RyStaticLayer from './src/index';
2
2
 
3
- RyKMLs.install = (Vue) => {
4
- Vue.install(RyKMLs.name, RyKMLs);
3
+ RyStaticLayer.install = (Vue) => {
4
+ Vue.install(RyStaticLayer.name, RyStaticLayer);
5
5
  };
6
6
 
7
- export default RyKMLs;
7
+ export default RyStaticLayer;
@@ -9,7 +9,7 @@
9
9
  } from 'ry-map';
10
10
  import Dto from './../../models/ryStaticLayer/index.js';
11
11
  export default {
12
- name: 'RyStaticLayers',
12
+ name: 'RyStaticLayer',
13
13
  props: {
14
14
  ...new Dto(),
15
15
  },
@@ -1,7 +1,7 @@
1
- import RyKMLs from './src/index';
1
+ import RyStaticLayers from './src/index';
2
2
 
3
- RyKMLs.install = (Vue) => {
4
- Vue.install(RyKMLs.name, RyKMLs);
3
+ RyStaticLayers.install = (Vue) => {
4
+ Vue.install(RyStaticLayers.name, RyStaticLayers);
5
5
  };
6
6
 
7
- export default RyKMLs;
7
+ export default RyStaticLayers;
@@ -1,24 +1,31 @@
1
1
  <template>
2
2
  <div class="map-style">
3
3
 
4
- <RyOfflineMap projection="EPSG:4326" :zoom="10" :minZoom="1" :maxZoom="21" :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)" v-if="dto" :boundaryModel="dto" :urls="urls" :bbox="bbox"
9
- :slicingZoom="13">
10
- <template #marker="{mapDto}">
11
- <ry-lines :map="mapDto.map" :startMarkerDto="startMarkerDto" :endMarkerDto="endMarkerDto"
12
- :moveMarkerDto="endMarkerDto" :isShowPlayback="isShowPaly" :linenIsert="lineData"
13
- @trackPlayEvent="trackPlayEvent($event)">
14
- </ry-lines>
15
- </template>
16
- </RyOfflineMap>
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
+ <!-- <RyOfflineMap
16
+ class="ry-offline-map"
17
+ :urls="urls"
18
+ :center="[118.84146054770122, 29.935677496166022]"
19
+ :minZoom="1"
20
+ :maxZoom="18"
21
+ @load="load"
22
+ >
23
+ </RyOfflineMap> -->
17
24
 
18
25
  <button @click="onClick()">测试</button>
19
26
  <button @click="onClick2()">测试2</button>
20
27
  <button @click="onClick3()">测试3</button>
21
-
28
+
22
29
  <!-- <aside class="aside-style">
23
30
  <el-button class="ele-text-primary" v-show="isShowPaly" style="padding:10px;"
24
31
  @click.stop="onShowPaly(false)">
@@ -33,7 +40,9 @@
33
40
 
34
41
  <script>
35
42
  import dayjs from 'dayjs'
36
- import RyOfflineMap from '@/components/maps/ryOfflineMap/src/index.vue';
43
+ import RyMap from '@/components/maps/ryMap/src/index.vue';
44
+ import RyOfflineMap from '@/components/maps/ryOfflineMap/src/index.vue';
45
+
37
46
  import RyMapTool from '@/components/maps/ryMapTool/src/index.vue';
38
47
  import RyPolygon from '@/components/maps/ryPolygon/src/index.vue';
39
48
  import RyPolygons from '@/components/maps/ryPolygons/src/index.vue';
@@ -42,19 +51,25 @@
42
51
  import geoJson from "./330112";
43
52
  import LineObj from './obj'
44
53
  import RyLines from '@/components/maps/ryLines/src/index.vue';
45
-
54
+ import RyKML from '@/components/maps/ryKML/src/index.vue';
55
+ import RyStaticLayer from '@/components/maps/ryStaticLayer/src/index.vue';
46
56
  export default {
47
57
  components: {
48
- RyOfflineMap,
58
+ RyMap,
49
59
  RyMapTool,
50
60
  RyPolygon,
51
61
  RyPolygons,
52
62
  RyClustersMarker,
53
63
  RyPolygonGeo,
54
- RyLines
64
+ RyLines,
65
+ RyKML,
66
+ RyStaticLayer,
67
+ RyOfflineMap
55
68
  },
56
69
  data() {
57
70
  return {
71
+ // bbox:[119.5172307870407,30.20294858200727,119.4830523878688,30.17494943404726],
72
+ kmlDto:null,
58
73
  map: null,
59
74
  lMap: null,
60
75
  polygonColorObj: null,
@@ -63,7 +78,7 @@
63
78
  // const bbox = [ 118.84072600000002, 29.937127000000032, 119.86315600000012, 30.445895000000064 ];
64
79
  // const center = [119.34667114000006, 30.198078622500038];
65
80
 
66
- bbox: [118.84146054770122, 29.935677496166022, 119.86391954737257, 30.44823698639243],
81
+ // bbox: [118.84146054770122, 29.935677496166022, 119.86391954737257, 30.44823698639243],
67
82
  isClear: false,
68
83
  colors: [],
69
84
  modelArr2: [{
@@ -106,7 +121,7 @@
106
121
  polygonModel: null,
107
122
  mapTool: null,
108
123
  isCheckPoint: null,
109
- gpsType: 0,
124
+ gpsType: 1,
110
125
  isRyMapTool: true,
111
126
  maxZoom: 18,
112
127
  lineData1: null,
@@ -129,11 +144,32 @@
129
144
  lineAppend: [],
130
145
  isShowPaly: true,
131
146
  layerArr: [2, 2],
132
- urls: [
133
- `https://zjhzla.ryaims.com/overlay/330112/satellite/{z}/{x}/{y}.jpg`,
134
- // `https://zjhzla.ryaims.com/overlay/330112/roadmap/{z}/{x}/{y}.png`,
135
- // `http://127.0.0.1:10006/${330112}/overlay/{z}/{x}/{y}.png`
147
+ // urls: [
148
+ // `https://zjhzla.ryaims.com/overlay/330112/satellite/{z}/{x}/{y}.jpg`,
149
+ // // `https://zjhzla.ryaims.com/overlay/330112/roadmap/{z}/{x}/{y}.png`,
150
+ // // `http://127.0.0.1:10006/${330112}/overlay/{z}/{x}/{y}.png`
151
+ // ],
152
+ urls:[
153
+ `http://127.0.0.1:10003/{z}/{x}/{y}.png`
136
154
  ],
155
+ model:{
156
+ id:1,
157
+ url:require('@/assets/layer.png'),
158
+ // bbox:[119.5172307870407,30.20294858200727,119.4830523878688,30.17494943404726],
159
+ // bbox:[119.4830523878688,30.17494943404726,119.5172307870407,30.20294858200727],
160
+ // bbox:[119.4830523878688,30.20294858200727,119.5172307870407,30.17494943404726],
161
+ bbox:[119.4830523878688,30.17494943404726,119.5172307870407,30.20294858200727],
162
+ zIndex:10,
163
+ },
164
+ model2:{
165
+ id:2,
166
+ url:require('@/assets/linan.png'),
167
+ // bbox:[119.5172307870407,30.20294858200727,119.4830523878688,30.17494943404726],
168
+ // bbox:[119.4830523878688,30.17494943404726,119.5172307870407,30.20294858200727],
169
+ // bbox:[119.4830523878688,30.20294858200727,119.5172307870407,30.17494943404726],
170
+ bbox:[119.485901,30.177281,119.514383,30.200616],
171
+ zIndex:9,
172
+ },
137
173
  dto: null,
138
174
  };
139
175
  },
@@ -152,6 +188,14 @@
152
188
  trackPlayEvent(e) {
153
189
  console.log(e);
154
190
  },
191
+ loadMap(e){
192
+ // this.kmlDto={
193
+ // bbox:[119.4830523878688,30.17494943404726,119.5172307870407,30.20294858200727],
194
+ // id: 'workId',
195
+ // url:'http://localhost:7601/1.kml',
196
+ // gcj02Url:'http://localhost:7601/1.kml'
197
+ // };
198
+ },
155
199
  load(obj) {
156
200
  console.log(obj);
157
201
  this.lMap = obj.mapServices;
@@ -182,7 +226,7 @@
182
226
  },
183
227
  mapMoveend(e) {
184
228
  // alert(1);
185
- // console.log(e);
229
+ console.log(e);
186
230
  },
187
231
  loadDrawPolygonEvent(e) {
188
232
  this.mapTool = e;