ry-vue-map 0.2.0 → 0.2.1

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.2.0",
3
+ "version": "0.2.1",
4
4
  "private": false,
5
5
  "main": "lib/ryui.umd.min.js",
6
6
  "description": "ry公共组件库",
@@ -104,13 +104,13 @@
104
104
  const pixel = this.map.getEventPixel(evt.originalEvent);
105
105
  const hit = this.map.hasFeatureAtPixel(pixel);
106
106
  if (hit) {
107
-    const _feature = this.map.forEachFeatureAtPixel(evt.pixel, feature => feature);
107
+   const _feature = this.map.forEachFeatureAtPixel(evt.pixel, feature => feature);
108
108
  const pro =_feature.getProperties();
109
109
  const view = this.map.getView();
110
- const [lon,lat]=view.getCenter();
111
- const _id = _feature.getId();
110
+ const [currentX,currentY]=view.getCenter();
111
+ const _id = _feature.getId();
112
112
  if(pro){
113
- this.$emit('mapClick', {...pro,id: _id ? _id:null,lon,lat});
113
+ this.$emit('mapClick', {...pro,id: _id ? _id:null, currentX, currentY});
114
114
  }
115
115
  }
116
116
  };