[MapProxy] High-dpi tiles from tileserver-gl

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[MapProxy] High-dpi tiles from tileserver-gl

Frank Purcell
In case this hasn't been answered, I've found that "@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.

This is what my config looks like:
sources:
  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
    grid: webmercator_hq


Am 28.05.2018 um 20:37 schrieb Travis Kirstine:
> worth trying the url encoded value for @  %40
> 
> 
> 
> On 28 May 2018 at 07:24, Matthias Woltering <woltering at gmail.com 
> <mailto:woltering at gmail.com>> wrote:
> 
>     Hi all,
> 
>     I would like to fetch high-dpi tiles from tileserver-gl via
>     mapproxy. To get retina-tiles you have to add "@2x" or "@3x" to the
>     tile-url:
> 
>     low-res-url:
>     http://my-tileserver-gl/styles/osm/10/1075/1342.png
>     <http://my-tileserver-gl/styles/osm/10/1075/1342.png>
> 
>     retina-url:
>     http://my-tileserver-gl/styles/osm/10/1075/1342@...
>     <http://my-tileserver-gl/styles/osm/10/1075/1342@...>
> 
>     see:
>     <http://tileserver.readthedocs.io/en/latest/endpoints.html#static-images
>     <http://tileserver.readthedocs.io/en/latest/endpoints.html#static-images>>
> 
>     I tried to add the string "@2x" to the template, but no luck.
> 
>     configuration:
>     ==============
>     sources:
>        my_tile_source_highdpi:
>          type: tile
>          grid: webmercator_hq
>          url:
>     <a href="http://my-tileserver-gl/styles/osm/%(z" class="">http://my-tileserver-gl/styles/osm/%(z)s/%(x)s/%(y)s at 2x.png
>     <<a href="http://my-tileserver-gl/styles/osm/%(z" class="">http://my-tileserver-gl/styles/osm/%(z)s/%(x)s/%(y)s at 2x.png>
> 
>     grids:
>          webmercator:
>              base: GLOBAL_WEBMERCATOR
>          webmercator_hq:
>              srs: "EPSG:3857"
>              origin: nw
>              min_res: 78271.51696402048
>              tile_size: [512, 512]
> 
>     error:
>     ======
>     mapproxy.source.tile - WARNING - could not retrieve tile: No
>     response from URL "http://2x.png": Name or service not known
> 
>     I also tried to escape the "@", but also no luck.
> 
>     Do I have to change the class  TileURLTemplate in client/tile.py? Or
>     is there a simpler method to solve the problem i.e. via configuration?
> 
>     Thanks for your help!
> 
> 
>     Matthias Woltering
>     _______________________________________________
>     MapProxy mailing list
>     MapProxy at lists.osgeo.org <mailto:MapProxy at lists.osgeo.org>
>     https://lists.osgeo.org/mailman/listinfo/mapproxy
>     <https://lists.osgeo.org/mailman/listinfo/mapproxy>
> 
> 


-- 
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
Dr. Matthias Woltering
Yorckstr. 22
40476 Düsseldorf
woltering at gmail.com
0176-60883761


_______________________________________________
MapProxy mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapproxy