osmbuildings
osmbuildings copied to clipboard
openlayers-5.3.0 create react app
Hi.
I'm trying to integrate this js into a project but when I import the library I get a lot of errors like:
./src/OSMBuildings-OL5.js
Line 272:9: Expected an assignment or function call and instead saw an expression no-unused-expressions
Line 859:9: Expected an assignment or function call and instead saw an expression no-unused-expressions
Line 1370:32: 'getGeometries' is not defined no-undef
Line 1380:32: 'getGeometries' is not defined no-undef
Line 1652:9: Expected an assignment or function call and instead saw an expression no-unused-expressions
Line 2015:9: '_ring' is not defined no-undef
Line 2137:9: Expected an assignment or function call and instead saw an expression no-unused-expressions
Line 2138:9: Expected an assignment or function call and instead saw an expression no-unused-expressions
Line 2342:9: Expected an assignment or function call and instead saw an expression no-unused-expressions
Line 2421:9: Expected an assignment or function call and instead saw an expression no-unused-expressions
Line 2565:9: 'setSize' is not defined no-undef
Line 2584:9: 'setZoom' is not defined no-undef
Search for the keywords to learn more about each error.
It's a create react app project, but it should work I think.
thanks
Sounds familiar. Can you confirm the library works standalone? Also, could you provide a running sample with your setup? Demo URL, CodePen etc.
It works perfectly in standalone app.I'm going to make an example
I created a sample repository
npm install
and npm start
https://github.com/All4Gis/OSMSample/tree/OSMBuildings
git checkout OSMBuildings
From what I see code did not get properly transpiled into ES6. Ideally you could fine tune this process.
Resulting tasks would be refactoring to a modern code base + providing an npm module.
Okay, I shall enquire and I'll try to make a working example. thanks
I've finally had time to make some changes. It's working. Here is a link to the example.
https://github.com/All4Gis/OSMSample/tree/OSMBuildings
And live demo https://all4gis.github.io/OSMSample/