Windy Community

    • Register
    • Login
    • Search
    • Unread
    • Categories
    • Groups
    • Go to windy.com
    1. Home
    2. garybrucey
    G
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 3
    • Best 0
    • Controversial 0
    • Groups 0

    garybrucey

    @garybrucey

    0
    Reputation
    168
    Profile views
    3
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    garybrucey Unfollow Follow

    Latest posts made by garybrucey

    • RE: Get all Overlay values from Picker location?

      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?

      posted in Windy API v4
      G
      garybrucey
    • RE: Windy API v4 is here. Help us to test it

      This works great for showing a map at a specific lat/long and letting the user move around the map and change options. Works on mobile too!

      posted in Windy API v4
      G
      garybrucey
    • 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")
                              console.log(picker)
                              console.log(windObject)
                              console.log(waveObject)
          })
      })
      
      posted in Windy API v4
      G
      garybrucey