[MapProxy] How use tile URLs including the '@' sign?

Holger Mügge mail at holgermuegge.de
Mon Aug 24 01:45:51 PDT 2020


As I see the proxy replaces the leading part of the url up to and including the @ sign. Since I do not provide username and password for authentification here. I end up with a GET request with a reduced and wrong url.

My current solution is a code fix in Mapproxy / client / tile.py so that I can use '%%40’ within the url to get the ‘@‘ instead:

    def __init__(self, template, format='png'):
        self.template = template.replace("%%40", "@", 1) 
        # replace added to enable @ sign for hd tile urls (holgermuegge)
        self.format = format
        self.with_quadkey = True if '%(quadkey)' in template else False
        self.with_tc_path = True if '%(tc_path)' in template else False
        self.with_tms_path = True if '%(tms_path)' in template else False
        self.with_arcgiscache_path = True if '%(arcgiscache_path)' in template else False
        self.with_bbox = True if '%(bbox)' in template else False


This works for me, but is not a good solution. Is there any better way to reach tile urls using @ sign within?

Thanks a lot,

Holger
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapproxy/attachments/20200824/f751626d/attachment.html>


More information about the MapProxy mailing list