Navigation

    Windy Community

    • Register
    • Login
    • Search
    • Unread
    • Categories
    • Groups
    • Go to windy.com

    How to show temperature instead of wind when loading a map?

    Windy API v4
    2
    2
    140
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J
      jorguzman100 last edited by

      When launching a map, it always show the wind overlay. i would like to set the option or parameter to launch the map with temperature overlay.
      This is my current code:

      /* --------------- Windy Map API --------------- */
      let options = {};
      function windyMap(city, cityData) {
      console.log("windyMap()");
      options = {
      // Required: API key
      key: "xxxxxxxxxx",

        // Put additional console output
        verbose: true,
      
        // Optional: Initial state of the map
        city: city,
        lat: cityData.lat,
        lon: cityData.lon,
        zoom: 11,
      };
      windyInit(options, windyCallBack);
      

      }

      function windyCallBack(windyAPI) {
      console.log("windyCallBack()");
      console.log("windyAPI: ", windyAPI);
      // windyAPI is ready, and contain 'map', 'store',
      // 'picker' and other usefull stuff

      const { map } = windyAPI;
      // .map is instance of Leaflet map
      
      L.popup()
        .setLatLng([options.lat, options.lon])
        .setContent(options.city)
        .openOn(map);
      

      }

      1 Reply Last reply Reply Quote 0
      • vsinceac
        vsinceac | Premium last edited by

        According to this post it wouldn't be possible.

        ¯\_(ツ)_/¯

        1 Reply Last reply Reply Quote 0
        • First post
          Last post
        Windyty, S.E. - all rights reserved. Powered by excellent NodeBB
        NodeBB & contributors, OSM & contributors, HERE maps
        Terms and Conditions     Privacy Policy