ghettovoice / vuelayers

Web map Vue components with the power of OpenLayers
https://vuelayers.github.io/
MIT License
680 stars 227 forks source link

ol instance #333

Closed xdursoc closed 4 years ago

xdursoc commented 4 years ago

Hi @ghettovoice, I have some trouble with the use of vuelayers, in other words (using an example): I'm trying to reproduce what reported here: https://jsfiddle.net/ghettovoice/r4ejqk93/37/ , but I have the following error: Error in v-on handler: "TypeError: Cannot read property 'ol' of undefined".
I tried to use: this.currentPosition = this.$refs.map.$map.proj.transform(hitFeature.getGeometry().getCoordinates(), 'EPSG:3857', 'EPSG:4326') and I obtain: Error in v-on handler: "TypeError: Cannot read property 'transform' of undefined".