openlayers-5.3.0 create react app
See original GitHub issueHi.
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
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
OpenLayers - Welcome
OpenLayers makes it easy to put a dynamic map in any web page. It can display map tiles, vector data and markers loaded...
Read more >Zoom doesn't change always init value when zoomin. ol 5.3.0 ...
It's a react.js project with OpenLayers 5.3.0. The map is defined in componentDidUpdate() { this.map = new Map({ target: this.container, ...
Read more >Using OpenLayers 5.3 in TypeScript without Node.js
https://github.com/ca0v/react-lab is an example of a project that uses ... Now I can produce a index.js and index.js.map containing all the ...
Read more >How to test Open Layers React components with Mocha (part I)
This tutorial is based on the test setup I made for Create React App based on Mocha, Chai, Enzyme and assumes you already...
Read more >How to create a simple map (with a marker) using OpenLayers
This tutorial is based on OpenLayers Quick Start Guide and the OpenLayers Popup Example and uses version 5.3.0 of the library. I suggest...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.
It works perfectly in standalone app.I’m going to make an example