Hello!
Is it possible to get (out of the box) detailed forecast table like at windy.com?
Best posts made by serbekh
-
show extended forecast table on picker clicked (like at windy.com)
Latest posts made by serbekh
-
Picker API behavior
I try to run windy picker example:
windyInit(options, windyAPI => { const { picker, utils, broadcast } = windyAPI; picker.on('pickerOpened', latLon => { // picker has been opened at latLon coords console.log(latLon); const { lat, lon, values, overlay } = picker.getParams(); // -> 48.4, 14.3, [ U,V, ], 'wind' console.log(lat, lon, values, overlay); const windObject = utils.wind2obj(values); console.log(windObject); }); picker.on('pickerMoved', latLon => { // picker was dragged by user to latLon coords console.log(latLon); }); picker.on('pickerClosed', () => { console.log('picker was closed!') }); // Wait since wather is rendered broadcast.once('redrawFinished', () => { picker.open({ lat: 48.4, lon: 14.3 }); // Opening of a picker (async) }); });
It loads great!
When I wanted to use other methods, something went wrong...
For example, I tried to open it, close it and open it again:... broadcast.once('redrawFinished', () => { picker.open({ lat: 48.4, lon: 14.3 }); picker.close(); picker.open({ lat: 45.4, lon: 45.3 }); // Opening of a picker (async) }); ...
- when I try to execute
picker.close()
, nothing happens. (It should print 'picker was closed!' to console) - This message ('picker was closed!') appears only on click on cross sign near picker.
- After that I tried to run
picker.open({ lat: 48.4, lon: 14.3 })
again, bun I've got another error:
Uncaught TypeError: this.show is not a function at Object.open (picker.js:4) at NewClass.eval (Map.vue?108f:99) at NewClass.fire (leaflet-src.js?e11e:593) at NewClass._fireDOMEvent (leaflet-src.js?e11e:4425) at NewClass._handleDOMEvent (leaflet-src.js?e11e:4382) at HTMLDivElement.handler (leaflet-src.js?e11e:2658)
So, question is how to close and open picker again programmatically.
- when I try to execute
-
RE: show extended forecast table on picker clicked (like at windy.com)
@serbekh said in show extended forecast table on picker clicked (like at windy.com):
So, is it possible to get picker with that arrow-down button to open detailed forecast with just windy weather API?
Unfortunately, there is no information about it at https://api.windy.com/map-forecast/docs.
And if it is impossible to get such detailed forecast with Map Weather API out of the box, how I may reproduce it? Maybe I should combine Map weatherAPI and Point forecast API? Or such beautiful UI is part only of windy.com and not provided in Windy API?Of course, I mean "Windy Map Forecast API".
-
RE: show extended forecast table on picker clicked (like at windy.com)
@Korina By default, when I use windy Map Forecast API I have such base interface (https://api.windy.com/map-forecast/examples/picker)
As you can see, it's little difference between windy.com interface and Windy Map Forecast API default interface.
Windy.com picker:
Windy Map Forecast API default picker:
So, is it possible to get picker with that arrow-down button to open detailed forecast with just windy weather API?
Unfortunately, there is no information about it at https://api.windy.com/map-forecast/docs.
And if it is impossible to get such detailed forecast with MapWeather API out of the box, how I may reproduce it? Maybe I should combine Map weatherAPI and Point forecast API? Or such beautiful UI is part only of windy.com and not provided in Windy API? -
show extended forecast table on picker clicked (like at windy.com)
Hello!
Is it possible to get (out of the box) detailed forecast table like at windy.com?