<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Zoom is limited to level 11]]></title><description><![CDATA[<p dir="auto">Is it new limitation in APIv4 that it is not possible to zoom more than level 11? In APIv3 zoom was working without problems.</p>
]]></description><link>https://community.windy.com/topic/6532/zoom-is-limited-to-level-11</link><generator>RSS for Node</generator><lastBuildDate>Sun, 11 Oct 2026 09:27:58 GMT</lastBuildDate><atom:link href="https://community.windy.com/topic/6532.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 21 Aug 2018 07:41:28 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Zoom is limited to level 11 on Fri, 25 Oct 2019 07:38:12 GMT]]></title><description><![CDATA[<p dir="auto">Just for anyone coming to this topic now, I used <a class="plugin-mentions-user plugin-mentions-a" href="/user/tedde" aria-label="Profile: Tedde">@<bdi>Tedde</bdi></a> / <a class="plugin-mentions-user plugin-mentions-a" href="/user/jalbert" aria-label="Profile: jalbert">@<bdi>jalbert</bdi></a>'s solution and it worked a treat, but I've found it can actually be achieved with a bit less code. <a class="plugin-mentions-user plugin-mentions-a" href="/user/jalbert" aria-label="Profile: jalbert">@<bdi>jalbert</bdi></a> added minZoom and maxZoom options to the tileLayer, essentially negating the need for the zoomend Event Listener that <a class="plugin-mentions-user plugin-mentions-a" href="/user/tedde" aria-label="Profile: Tedde">@<bdi>Tedde</bdi></a> suggested. So in short, the following code is all that's required:</p>
<pre><code>map.options.minZoom = 4;
map.options.maxZoom = 17;

var topLayer = L.tileLayer('https://b.tile.openstreetmap.org/{z}/{x}/{y}.png', {
    attribution: 'Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, ',
    minZoom: 12,
    maxZoom: 17
}).addTo(map);
</code></pre>
]]></description><link>https://community.windy.com/post/32071</link><guid isPermaLink="true">https://community.windy.com/post/32071</guid><dc:creator><![CDATA[MMurphyThree]]></dc:creator><pubDate>Fri, 25 Oct 2019 07:38:12 GMT</pubDate></item><item><title><![CDATA[Reply to Zoom is limited to level 11 on Wed, 31 Oct 2018 22:03:45 GMT]]></title><description><![CDATA[<p dir="auto">OK, thanks, I have this working now -- specifically in the lines right after :</p>
<pre><code>// Initialize Windy API
windyInit( options, windyAPI =&gt; {
    // windyAPI is ready, and contains 'map', 'store',
    // 'picker' and other useful stuff
    // const { map } = windyAPI
    var { map } = windyAPI
    // .map is instance of Leaflet map
</code></pre>
<p dir="auto">the code added to get it working is:</p>
<pre><code>    map.options.minZoom = 4;
    map.options.maxZoom = 17;

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

    map.on('zoomend', function() {
        if (map.getZoom() &gt;= 12) {
            topLayer.setOpacity('1');
        } else {
            topLayer.setOpacity('0');
        }
    });
    map.setZoom(14);
</code></pre>
<p dir="auto">and it now works for me.  (Adding the minZoom and maxZoom settings to the const options = { ... } settings before the WindyInit, or any code before var { map } = windyAPI in the WindyInit, did not work for me.)  Thanks!</p>
<p dir="auto">(BTW, I'll have a couple more questions later on a couple of other Windy API4 / Leaflet minor issues I'm having that are unrelated to the zoom levels.)</p>
<p dir="auto">Thank you very very much!!!<br />
justin</p>
]]></description><link>https://community.windy.com/post/16401</link><guid isPermaLink="true">https://community.windy.com/post/16401</guid><dc:creator><![CDATA[jalbert]]></dc:creator><pubDate>Wed, 31 Oct 2018 22:03:45 GMT</pubDate></item><item><title><![CDATA[Reply to Zoom is limited to level 11 on Tue, 30 Oct 2018 07:26:04 GMT]]></title><description><![CDATA[<p dir="auto">You can adjust the zoom levels by adding the following code to the windyInit{}</p>
<pre><code>map.options.minZoom = 4;
map.options.maxZoom = 18;
</code></pre>
<p dir="auto">Then you can add another tile layer, hidden by default if you start at a higher zoom level:</p>
<pre><code>topLayer =L.tileLayer('https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}').addTo(map); 
topLayer.setOpacity('0');       
</code></pre>
<p dir="auto">Create a document ready with and add a zoomend listener that detects if the zoom is 12 or higher. If so, show the 'other' tile layer.</p>
<pre><code>map.on('zoomend', function() { 
    if (map.getZoom() &gt;= 12) {
        topLayer.setOpacity('1');
    } else {
        topLayer.setOpacity('0');   
    }
});
</code></pre>
<p dir="auto">You can now zoom in to a deep level, in this example 18, with a tile layer of your own choice.<br />
Note: this is leaflet related, not specifically Windy API related.</p>
<p dir="auto"><img src="/assets/uploads/files/1540884246597-windyzooming-resized.jpg" alt="0_1540884242922_windyzooming.jpg" class=" img-fluid img-markdown" /></p>
]]></description><link>https://community.windy.com/post/16337</link><guid isPermaLink="true">https://community.windy.com/post/16337</guid><dc:creator><![CDATA[Tedde]]></dc:creator><pubDate>Tue, 30 Oct 2018 07:26:04 GMT</pubDate></item><item><title><![CDATA[Reply to Zoom is limited to level 11 on Mon, 29 Oct 2018 18:55:45 GMT]]></title><description><![CDATA[<p dir="auto">Exact same issue here as well.  I also asked about this in:<br />
<a href="https://community.windy.com/topic/6580/adding-zoomed-in-layers-in-api-v4">https://community.windy.com/topic/6580/adding-zoomed-in-layers-in-api-v4</a></p>
<p dir="auto">and other people have also asked about this problem in other threads, but no one yet has mentioned a fix (or API update) for this issue so far I believe...</p>
]]></description><link>https://community.windy.com/post/16329</link><guid isPermaLink="true">https://community.windy.com/post/16329</guid><dc:creator><![CDATA[jalbert]]></dc:creator><pubDate>Mon, 29 Oct 2018 18:55:45 GMT</pubDate></item><item><title><![CDATA[Reply to Zoom is limited to level 11 on Mon, 29 Oct 2018 00:57:44 GMT]]></title><description><![CDATA[<p dir="auto">same issue here. Not having the zoom go past 11 makes my project pretty much impossible to attain with windy. I may have to use google maps api with general markers to indicate wind speed at a certain spot. I honestly don't know what to do...</p>
]]></description><link>https://community.windy.com/post/16293</link><guid isPermaLink="true">https://community.windy.com/post/16293</guid><dc:creator><![CDATA[maxmastalerz]]></dc:creator><pubDate>Mon, 29 Oct 2018 00:57:44 GMT</pubDate></item><item><title><![CDATA[Reply to Zoom is limited to level 11 on Mon, 01 Oct 2018 15:39:48 GMT]]></title><description><![CDATA[<p dir="auto">Hi,<br />
I have the same problem. Have found an answer ?</p>
]]></description><link>https://community.windy.com/post/15437</link><guid isPermaLink="true">https://community.windy.com/post/15437</guid><dc:creator><![CDATA[Vincent Lion]]></dc:creator><pubDate>Mon, 01 Oct 2018 15:39:48 GMT</pubDate></item></channel></rss>