Get all Overlay values from Picker location?

  • Hi, I am trying to get information about multiple overlays - wind, waves, visibility - at the picker location but haven't had much luck. the wave2obj and wind2obj API's both return the same data, which is just the overlay I have selected in the UI. My goal is to get this data from an arbitrary lat/long, without the user selecting a picker location. Any helps is appreciated!

    windyInit( options, windyAPI => {
                        // windyAPI is ready, and contain 'map', 'store',
                        // 'picker' and other usefull stuff
                        const { picker, utils, broadcast, map, overlays } = windyAPI
                        // .map is instance of Leaflet map
                        picker.on('pickerOpened', latLon => {
                            // picker has been opened at latLon coords
                            let { lat, lon } = picker.getParams()
                            // seems to only work when the map is set to the right context.
                            let windObject = utils.wind2obj(overlays.wind.convertValue())
                            let waveObject = utils.wave2obj(overlays.waves.convertValue())
                            console.log("VALUES \n")

  • Developers Sailor

    I recon the picker can only report data for the currently selected overlay.

  • That would make sense, but calling store.set('overlay','waves') doesn't change the value the picker reports. Do I need to ask for information a different way?

  • Administrator

    There is BUG in picker for a long time I think. Picker do not know that overlay changed and you have to moove picker a little I guess.

  • Hi All,
    Has someone been able to answer this question?

    I am interested in pulling all the weather data from a specific point where the picker was placed, without much success as described by Gary.


Log in to reply

Windyty, S.E. - all rights reserved. Powered by excellent NodeBB
NodeBB & contributors, OSM & contributors, HERE maps
Terms and Conditions     Privacy Policy