ry-vue-map 0.3.1 → 0.3.3

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.3.1",
3
+ "version": "0.3.3",
4
4
  "private": false,
5
5
  "main": "lib/ryui.umd.min.js",
6
6
  "description": "ry公共组件库",
@@ -41,9 +41,11 @@
41
41
  "countup.js": "~2.0.7",
42
42
  "dayjs": "^1.11.7",
43
43
  "element-ui": "~2.15.6",
44
+ "kml-geojson": "^1.2.2",
45
+ "kml-to-geojson": "^1.0.13",
44
46
  "nprogress": "~0.2.0",
45
47
  "ol": "^6.14.1",
46
- "ry-map": "^0.4.2",
48
+ "ry-map": "^0.4.3",
47
49
  "vue": "~2.6.14",
48
50
  "vue-demi": "^0.13.11",
49
51
  "vue-router": "~3.5.2",
@@ -214,25 +214,27 @@
214
214
 
215
215
  _setColor(obj){
216
216
  const {color,id} =obj;
217
- if( this.kmlMap.has(this.lastId)){
218
- const kml =this.kmlMap.get(this.lastId);
219
- kml.setPolygonColor([this.lastColor,this.lastColor]);
220
- }
217
+ // if( this.kmlMap.has(this.lastId)){
218
+ // const kml =this.kmlMap.get(this.lastId);
219
+ // kml.setPolygonColor([this.lastColor,this.lastColor]);
220
+ // }
221
221
  if(this.kmlMap.has(id)){
222
222
  const kml =this.kmlMap.get(id);
223
223
  kml.setPolygonColor([color,color]);
224
224
 
225
225
  }
226
- const _obj=this.modelArr.find(r=> r.id=id);
227
- if(_obj){
228
- this.lastId=_obj.id;
229
- this.lastColor=_obj.stroke;
230
- }
226
+ // const _obj=this.modelArr.find(r=> r.id=id);
227
+ // if(_obj){
228
+ // this.lastId=_obj.id;
229
+ // this.lastColor=_obj.stroke;
230
+ // }
231
231
  this._setZoom();
232
- if(this.bboxMapGCJ02.has(id)){
232
+ },
233
+ setCenter(id){
234
+ if(this.bboxMapGCJ02.has(id)){
233
235
  const bbox=this.gpsType == 1 ? this.bboxMapGCJ02.get(id) : this.bboxMap.get(id);
234
236
  this.setFitFist(bbox);
235
- }
237
+ }
236
238
  },
237
239
 
238
240
  showAll() {
@@ -105,6 +105,7 @@
105
105
  url,
106
106
  bbox,
107
107
  zIndex,
108
+ projection
108
109
  } = dto;
109
110
  if (!this.staticMap.has(id)) {
110
111
  const img = new StaticImage({
@@ -112,7 +113,8 @@
112
113
  url,
113
114
  imageExtent:bbox,
114
115
  zIndex,
115
- type:this.gpsType
116
+ type:this.gpsType,
117
+ projection,
116
118
  },
117
119
  this.map);
118
120
  this.staticMap.set(id, img);