<div dir="ltr"><div><div><div><div>@Phil:<br><br></div>I read the `getURL` method of the `WMTS`. <br><br></div>It seems that this method will return the wmts request url according to the current tile bounds.<br><br></div>Then my first thought is override this method, and caculate the urls accordingly. <br>

<br>But then I found that will cause some problems.<br><br></div>I am not sure if you remember my last post "wmts layer with different server provider":<br><br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<i>We have a large scope of map data which are published by wmts. But 
they are deployed at the different server, Each server hold a part of 
the data. And we use the bbox to define the extent of the provided data.<br><br>For example,<br><br>0,0,20,20 ==> <a href="http://server1/wmts">http://server1/wmts</a>.. (this means data inside the bbox of (0,0,20,20) should request the data from server1.<br>

</i></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><i>20,20,40,40 ==> <a href="http://server2/wmtsservice.">http://server2/wmtsservice.</a>..</i> </blockquote>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">And finally I decided to create each layer for a server and make them overlayed.</blockquote><div><br>

</div><div> Now, if I override the method `getURL` of `WMTS`, then I just need to create one WMTS layer. However it have a <span class="">potentialproblem:<br><br></span></div><div><span class="">  As I have said, each wmts server have a extent, let's take it as a bounds.  Then two wmts server will have to bounds: bounda and boundb.<br>

<br></span></div><div><span class="">  Now if I add one wmts layer, the I tried to caculate the url of one tile according to its tileBound,then how about if this tileBound cover across both bounda and boundb? In this case, I can only choose one server to requset.<br>

<br> <br></span></div><div><span class=""> That's why I tried to create layer one for each server.<br><br></span></div><div><span class="">  Since the WMTS is out of our control, and is deployed in an local network. So in this post, I use the OSM instead of wmts, and use the sub domain to imitate</span> different<i> </i>wmts servers.<br>

<br><br></div><div>And during my test, I found that it seems that the min/max resolution does not work as expected. For example:<br><br></div><div>layera(minzoom=0,maxzoom=3) request data from `a.tile`<br></div><div>layerb(minzoom=4,maxzoom=5) request data from `b.tile`<br>

layerc(minzoom=6,maxzoom=7) request data from `c.tile`<br></div><div><br><br></div><div>Now when map is zoomed to 3, layera is activated.<br><br></div><div>When map is zoomed to 5, layerb is actiaated, but layera is not deactivated.<br>

<br>when map is zoomed to 7, layerc is activated, and layerb is deactivated but layera is still not deactivated.<br><br></div><div>Then I found that because layera is the first layer added to the map , so it is set to be as the baselayer. And even this layer is outof range, it is still activated. Any idea to fix it?<br>

</div><div><br><br></div></div></div></div>