t.CharAt is not a function
-
When calling
getPointForecast
, I'm getting this error:Uncaught (in promise) TypeError: t.charAt is not a function at K (index.js:1:9086) at tn (index.js:1:38821) at an (index.js:1:39661) at y (windy-plugin-pg-mapa:1:1406) at i. (windy-plugin-pg-mapa:1:777) at i.fire (leaflet140_patched_tileLayer.v17.js:5:5090) at i.cb (windy-plugin-pg-mapa:1:1324) at i.value (index.js:1:269203) at i.value (index.js:1:267558)
The error is visible at https://www.windy.com/plugins/windy-plugin-pg-mapa?iconEu,48.384,20.016,9 when you click any takeoff.
Please help.
-
@jakubvrana There were certain changes made and the plugin needs to be updated. Newly, the method returns Promise with data, instead of string with URL.
-
@Ondřej-Šutera Thanks, now it works. It's the same for
getMeteogramForecast
. -
@Ondřej-Šutera There's one more problem. I'm displaying the wind forecast with this code:
W.store.set("detailDisplay", "wind"); W.broadcast.fire("rqstOpen", "detail", "...");
This doesn't work anymore because
store
doesn't havedetailDisplay
anymore. How can I display the wind (or meteogram) forecast now? -
@jakubvrana It is quite tricky now. The detail plugin has been rewritten to svelte, so it is now a part of inner svelte store. You can force it only when detail plugin has not been open yet:
W.broadcast.emit('rqstOpen', 'detail', { display: 'wind', source: 'url', ... });
But in a case it has been already open, I am affraid there is no way how to achive what you need :-/
-
@marekd It doesn't work.
W.broadcast.fire("rqstOpen", "detail", {"lat":48.44783,"lon":19.98392,"display":"wind"});
This still opens the basic forecast, not the wind forecast.
Can you add back the option to display different kinds of forecast? It's very useful to have this quickly available.