adding zoomed-in layers in api v4



  • 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


Log in to reply
 

Windyty, S.E. - all rights reserved. Powered by excellent NodeBB
NodeBB & contributors, OSM & contributors, HERE maps

Looks like your connection to Windy Community was lost, please wait while we try to reconnect.