Strange error on "new Osm()" #200
-
Hi Tino, I've been working with gwt-ol for six month now...and i have a very strange error . I haven't modified my code for weeks...when suddenly today, this following part of my code " Osm osmSource = new Osm();" generates this error : So, my map is not displayed. I came back to my old version, the one which perfectly works, and I have the same error. My environment is the same, my libraries are the same, etc. The error appeared between two tests this afternoon...and i have no clue to solve it. Please, tell me you have THE solution ! Here is my code : *_try {
|
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 1 reply
-
I add a precision : when I test with Mozilla, the error is "$wnd.ol is undefined". |
Beta Was this translation helpful? Give feedback.
-
Hi Tino, After hours and hours, i found the solution :)
<script src="//cdn.jsdelivr.net/gh/openlayers/openlayers.github.io@main/dist/en/v6.6.1/build/ol.js" ></script> Now, you should use :
I hope it helped ! |
Beta Was this translation helpful? Give feedback.
-
Already ansered in other thread.
You should use latest version of 6: https://cdn.jsdelivr.net/gh/openlayers/openlayers.github.io@main/dist/en/v6.15.1/build/ol.js |
Beta Was this translation helpful? Give feedback.
-
I forgot to say that you should download, pack and link the ol assets you need to your application to be indepedent of 3rd party services. Greetings! |
Beta Was this translation helpful? Give feedback.
Already ansered in other thread.
You should use latest version of 6: https://cdn.jsdelivr.net/gh/openlayers/openlayers.github.io@main/dist/en/v6.15.1/build/ol.js
Because the API changed on some locations after that versions, which can cause breaking your code. I will update gwt-ol for using new versions in near future that is stable with newest versions.