<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><pre class="">In case this hasn't been answered, I've found that<i class=""> "@2x" can be replaced with %%402x.  Using the %40 escape for the @ character is correct ... and based on the log errors, the URL is part of a python formatting clause, so have to do the funky %% to escape the % for python.</i></pre><pre class=""><br class=""></pre><pre class="">This is what my config looks like:</pre><pre class="">sources:</pre><pre class="">  map_hq_source:
    type: tile
    url: <a href="http://a.tile.stamen.com/toner-lite/%(z)s/%(x)s/%(y)s%%402x.png" class="">http://a.tile.stamen.com/toner-lite/%(z)s/%(x)s/%(y)s%%402x.png</a>
    grid: webmercator_hq
</pre><div class=""><br class=""></div><pre class=""><br class=""></pre><pre class="">
Am 28.05.2018 um 20:37 schrieb Travis Kirstine:
><i class=""> worth trying the url encoded value for @  %40
</i>><i class=""> 
</i>><i class=""> 
</i>><i class=""> 
</i>><i class=""> On 28 May 2018 at 07:24, Matthias Woltering <<a href="https://lists.osgeo.org/mailman/listinfo/mapproxy" class="">woltering at gmail.com</a> 
</i>><i class=""> <mailto:<a href="https://lists.osgeo.org/mailman/listinfo/mapproxy" class="">woltering at gmail.com</a>>> wrote:
</i>><i class=""> 
</i>><i class="">     Hi all,
</i>><i class=""> 
</i>><i class="">     I would like to fetch high-dpi tiles from tileserver-gl via
</i>><i class="">     mapproxy. To get retina-tiles you have to add "@2x" or "@3x" to the
</i>><i class="">     tile-url:
</i>><i class=""> 
</i>><i class="">     low-res-url:
</i>><i class="">     <a href="http://my-tileserver-gl/styles/osm/10/1075/1342.png" class="">http://my-tileserver-gl/styles/osm/10/1075/1342.png</a>
</i>><i class="">     <<a href="http://my-tileserver-gl/styles/osm/10/1075/1342.png" class="">http://my-tileserver-gl/styles/osm/10/1075/1342.png</a>>
</i>><i class=""> 
</i>><i class="">     retina-url:
</i>><i class="">     <a href="http://my-tileserver-gl/styles/osm/10/1075/1342@2x.png" class="">http://my-tileserver-gl/styles/osm/10/1075/1342@2x.png</a>
</i>><i class="">     <<a href="http://my-tileserver-gl/styles/osm/10/1075/1342@2x.png" class="">http://my-tileserver-gl/styles/osm/10/1075/1342@2x.png</a>>
</i>><i class=""> 
</i>><i class="">     see:
</i>><i class="">     <<a href="http://tileserver.readthedocs.io/en/latest/endpoints.html#static-images" class="">http://tileserver.readthedocs.io/en/latest/endpoints.html#static-images</a>
</i>><i class="">     <<a href="http://tileserver.readthedocs.io/en/latest/endpoints.html#static-images" class="">http://tileserver.readthedocs.io/en/latest/endpoints.html#static-images</a>>>
</i>><i class=""> 
</i>><i class="">     I tried to add the string "@2x" to the template, but no luck.
</i>><i class=""> 
</i>><i class="">     configuration:
</i>><i class="">     ==============
</i>><i class="">     sources:
</i>><i class="">        my_tile_source_highdpi:
</i>><i class="">          type: tile
</i>><i class="">          grid: webmercator_hq
</i>><i class="">          url:
</i>><i class="">     <a href="http://my-tileserver-gl/styles/osm/%(z" class="">http://my-tileserver-gl/styles/osm/%(z</a>)s/%(x)s/%(y)<a href="https://lists.osgeo.org/mailman/listinfo/mapproxy" class="">s at 2x.png</a>
</i>><i class="">     <<a href="http://my-tileserver-gl/styles/osm/%(z" class="">http://my-tileserver-gl/styles/osm/%(z</a>)s/%(x)s/%(y)<a href="https://lists.osgeo.org/mailman/listinfo/mapproxy" class="">s at 2x.png</a>>
</i>><i class=""> 
</i>><i class="">     grids:
</i>><i class="">          webmercator:
</i>><i class="">              base: GLOBAL_WEBMERCATOR
</i>><i class="">          webmercator_hq:
</i>><i class="">              srs: "EPSG:3857"
</i>><i class="">              origin: nw
</i>><i class="">              min_res: 78271.51696402048
</i>><i class="">              tile_size: [512, 512]
</i>><i class=""> 
</i>><i class="">     error:
</i>><i class="">     ======
</i>><i class="">     mapproxy.source.tile - WARNING - could not retrieve tile: No
</i>><i class="">     response from URL "<a href="http://2x.png" class="">http://2x.png</a>": Name or service not known
</i>><i class=""> 
</i>><i class="">     I also tried to escape the "@", but also no luck.
</i>><i class=""> 
</i>><i class="">     Do I have to change the class  TileURLTemplate in client/tile.py? Or
</i>><i class="">     is there a simpler method to solve the problem i.e. via configuration?
</i>><i class=""> 
</i>><i class="">     Thanks for your help!
</i>><i class=""> 
</i>><i class=""> 
</i>><i class="">     Matthias Woltering
</i>><i class="">     _______________________________________________
</i>><i class="">     MapProxy mailing list
</i>><i class="">     <a href="https://lists.osgeo.org/mailman/listinfo/mapproxy" class="">MapProxy at lists.osgeo.org</a> <mailto:<a href="https://lists.osgeo.org/mailman/listinfo/mapproxy" class="">MapProxy at lists.osgeo.org</a>>
</i>><i class="">     <a href="https://lists.osgeo.org/mailman/listinfo/mapproxy" class="">https://lists.osgeo.org/mailman/listinfo/mapproxy</a>
</i>><i class="">     <<a href="https://lists.osgeo.org/mailman/listinfo/mapproxy" class="">https://lists.osgeo.org/mailman/listinfo/mapproxy</a>>
</i>><i class=""> 
</i>><i class=""> 
</i>

-- 
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
Dr. Matthias Woltering
Yorckstr. 22
40476 Düsseldorf
<a href="https://lists.osgeo.org/mailman/listinfo/mapproxy" class="">woltering at gmail.com</a>
0176-60883761</pre><div class=""><br class=""></div></body></html>