Hi ionic people;
Noob with ionic, troubles trying to use openlayers (ol) with ionic display maps.
Versions:
ionic@4.1.2
npm list ionic -> ol@5.2.0
Trying to run this demo (found in the thread " Openlayers 4 Map control doesn’t work in Ionic":
ionic serve ends with this error in browser:
Runtime Error:
WEBPACK_IMPORTED_MODULE_2_ol.default is undefined
Stack:
[394]/HomePage.prototype.loadmap@h t t p://localhost:8100/build/main.js:85:21 [394]/HomePage.prototype.ionViewDidEnter@h t t p://localhost:8100/build/main.js:68:9 ViewController.prototype._lifecycle@h t t p://localhost:8100/build/vendor.js:23299:13 ViewController.prototype._didEnter@h t t p://localhost:8100/build/vendor.js:23208:9 NavControllerBase.prototype._didEnter@h t t p://localhost:8100/build/vendor.js:64831:13 NavControllerBase.prototype._transitionFinish@h t t p://localhost:8100/build/vendor.js:64662:17 NavControllerBase.prototype._transitionStart/</<@h t t p://localhost:8100/build/vendor.js:64648:20 F</l</t.prototype.invoke@h t t p://localhost:8100/build/polyfills.js:3:14974 onInvoke@h t t p://localhost:8100/build/vendor.js:5134:24 F</l</t.prototype.invoke@h t t p://localhost:8100/build/polyfills.js:3:14901 F</c</r.prototype.run@h t t p://localhost:8100/build/polyfills.js:3:10124 NgZone.prototype.run@h t t p://localhost:8100/build/vendor.js:4951:54 NavControllerBase.prototype._transitionStart/<@h t t p://localhost:8100/build/vendor.js:64647:50 F</l</t.prototype.invoke@h t t p://localhost:8100/build/polyfills.js:3:14974 onInvoke@h t t p://localhost:8100/build/vendor.js:5134:24 F</l</t.prototype.invoke@h t t p://localhost:8100/build/polyfills.js:3:14901 F</c</r.prototype.run@h t t p://localhost:8100/build/polyfills.js:3:10124 f/<@ht t p://localhost:8100/build/polyfills.js:3:20240 F</l</t.prototype.invokeTask@h t t p://localhost:8100/build/polyfills.js:3:15649 onInvokeTask@h t t p://localhost:8100/build/vendor.js:5125:24 F</l</t.prototype.invokeTask@h t t p://localhost:8100/build/polyfills.js:3:15562 F</c</r.prototype.runTask@h t t p://localhost:8100/build/polyfills.js:3:10815 o@h t t p://localhost:8100/build/polyfills.js:3:7887
Ionic Framework: 3.9.2
Ionic App Scripts: 3.2.0
Angular Core: 5.2.11
Angular Compiler CLI: 5.2.11
Node: 8.11.4
OS Platform: Linux x86_64
I managed to run this leaflet demo:
Then I updated it to a basic openlayers demo, but got same error as above
Any help greatly appreciated, thanks in advance !