[MapProxy] Patch for TMS source
Pascal Bihler
bihler at cs.uni-bonn.de
Wed May 5 08:12:29 EDT 2010
Hi!
In order to make the "cache_tms" source functionality of MapProxy more useful, I added two more options to the configuration:
quadkey: # can be True or False
If this option is set to "True", the request url is constructed as <url>/r<quadkey>.<format> instead of <url>/<z>/<x>/<y>.<format> This is useful for tile servers using the Microsoft Bing addressing scheme (http://msdn.microsoft.com/en-us/library/bb259689.aspx)
url_format: # can be "base" or "raw"
If set to "raw", the url is interpreted as a format string instead of just being the tile base url. The following placeholders are being replaced:
if quadkey == False:
%(z)s - the zoom level
%(x)s - the tile x coordinate
%(y)s - the tile y coordinate
%(format)s - the tile format
if quadkey == True:
%(q)s - the tile quadkey
%(format)s - the tile format
Examples:
url: http://my.flat.server/%(z)s-%(x)s-%(y)s.%(format)s
url: http://some.bing.style.server.net/tiles/r%(q)s.png?g=100 # %(format)s left out here...
This option offers way more flexibility in including TMS servers than just assuming that the standard </z/x/y.format> works...
I attached the patch file for the current Mercurial head. Unfortunately, I didn't know how to run the test, so I have to ask the maintainers for adding those. I hope, you'll find the oatch worthy to include it into your project.
Sincerely,
Pascal Bihler
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tms.patch
Type: application/octet-stream
Size: 3591 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/mapproxy/attachments/20100505/627413c4/tms.obj
More information about the MapProxy
mailing list