Windy Community

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

    adding zoomed-in layers in api v4

    Windy API v4
    1
    1
    849
    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
      jalbert last edited by

      Dear Windy team,

      Just FYI I've been waiting a week or so to post this because I thought it might possibly be fixed in updates, or perhaps be redundant with other people's questions or preliminary bug reports(?), but when I try to add zoomed-in layers in API v4, via either (for example):

        L.tileLayer('http://b.tile.openstreetmap.org/{z}/{x}/{y}.png', {
          attribution: 'Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, ',
          maxZoom: 17,
          minZoom: 12
        }).addTo(map);
      

      or within the API initialization itself:

      const options = {
      
                  // Required: API key
                  key: 'OznecmCq1hd17S4F3e5rtotajmkUBw2D',
      
                  // Put additional console output
                  verbose: true,
      
                  // Optional: Initial state of the map
            lat:   48.46,
            lon: -123.31,
            zoom: 11,
            layers: [
              L.tileLayer('http://b.tile.openstreetmap.org/{z}/{x}/{y}.png', {
                minZoom: 12,
                maxZoom: 17,
                attribution: 'Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, '
              })
            ],
            minZoom: 0,
            maxZoom: 17
      }
      
      // Initialize Windy API
      windyInit( options, windyAPI => {
      

      ... etc ...

      then those zoomed-in layers do not get added to the map (or at least are not accessible via the usual zoom buttons) -- whereas the above work fine in v2.3. Am I doing something wrong? -- do these layer additions need to be done differently in API v4?

      Thank you all so much!
      Justin

      1 Reply Last reply Reply Quote 2
      • 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