ghettovoice / vuelayers

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

Missing lib folder for new version #484

Closed monsieurpommedeterre closed 2 years ago

monsieurpommedeterre commented 2 years ago

Hello,

I was previously using vuelayers 0.11.37, but when recreating another project I ended up with the more recent 0.12.2 version. In my previous project I was importing stuffs from ol-ext lib from vuelayers as: import { createProj, addProj, findPointOnSurface, createStyle, } from "vuelayers/lib/ol-ext";

and it was working fine. But now with the 0.12.2 version I get "This dependency was not found: * vuelayers/lib/ol-ext" error.

Should I import it differently since the new version ? Why is there no longer a lib folder in the module ?

Thank you

ghettovoice commented 2 years ago

Hello @monsieurpommedeterre , with 0.12 ol-ext helpers can be imported from vuelayers/dist/ol-ext. However createProj, addProj is removed. You should replace them with OpenLayers API:

import Projection from 'ol/proj/Projection'
import { addProjection } from 'ol/proj'

const projection = new Projection({ ... })
addProjection(projection)
monsieurpommedeterre commented 2 years ago

Ok thank you for the answer