Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vuejs with leaflet(1.6.0) error says wkt.fromObject is not a function #147

Open
ryuchaehwa opened this issue Jun 16, 2020 · 0 comments
Open

Comments

@ryuchaehwa
Copy link

Hello, I have a problem that wkt.fromObject() methods which doesn't work in vuejs web. I've checked other issues below(google api issue) but i'm using leaflet and I'm not sure how to fix it. Please check below and advise me.

package.json

"wicket": "^1.3.6"
"leaflet": "^1.6.0",
"terraformer": "^1.0.6",
"terraformer-wkt-parser": "^1.1.2",

code

if (layer instanceof L.LinkPolyline) {

          let geometry = wkt.fromObject(layer.toGeoJSON().geometry).write()
}

p.s I'm converting vanilla leaflet.js to vuejs framework at the moment. This code works in our original vanilla js project with leaflet 1.0.6 but with npm installed, it just doesn't work. Also, If I import the module like this

import * as wkt from 'wicket' 

wicket__WEBPACK_IMPORTED_MODULE_21__.fromObject is not a function

there's another error so I'm importing it like this:
let wkt = require('wicket')

Regards,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant