Windy API development for single page applications
I am doing Windy API development with Vuejs and I am experiencing unexpected errors where the map does not load, even though I am trying to take care of removing the Windy API objects in the DOM on unmounting events.
The problem is usually fixed by reloading the page but what I want is to be able to navigate between pages and refresh the map without errors in the console or failed loads of the map.
Does Windy have a primer for SPA developers and the Windy API or if not, are you planning on improving the Windy API at some point for SPA developers?
@helgiben After a few days of hacking and kludges we got windy to work again in a SPA in angular. It worked just fine with an old version of windy. Windy changed something Aug 1st. and I had to spend a few days trying to get the lastest up-to-date version of windy to work.
Anyway, to make a long story short even if you do get windy to work in a SPA, the solution will be short lived. This message now appears in the console: Repeatedly calling "windyInit" of an already initialized API is an unsupported functionality and will be removed in future versions
Due to the way angular works after you leave or destroy a component the div with windy is destroyed. When you visit the component again it is resurrected. You need to call windyInit again to get windy to work with the new div. That works just fine today. They are warning you that it will no longer work in the future. I suspect that windy divs in react or vue SPA's work the similarly?
I exchanged a few emails with windy tech support and they suggest to use windy in an iframe. That will not work with our setup.