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

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

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

Holger Mügge
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

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