[MapProxy] Patch for TMS source

Oliver Tonnhofer olt at omniscale.de
Sun May 16 12:10:46 EDT 2010

On 05.05.2010, at 14:12, Pascal Bihler wrote:
> In order to make the "cache_tms" source functionality of MapProxy more useful, I added two more options to the configuration:
> [...]
> 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 did not wanted to change cache_tms since TMS is a standard, so I've added a new cache source that is based on your idea and way more flexible than the existing cache_tms.

  - type: cache_tiles
    url: http://localhost:8080/tile?x=%(x)s&y=%(y)s&z=%(z)s&format=%(format)s
    origin: ``nw``

The new cache_tiles accepts the following keys:
``x``, ``y``, ``z``
  The tile coordinate.
  The format of the tile.
  Quadkey for the tile as described in http://msdn.microsoft.com/en-us/library/bb259689.aspx
  TileCache path like ``09/000/000/264/000/000/345``. Note that it does not contain any format

This should add support for most tile servers out there. Let me know if I missed some obscure format :)

The change will be included in 0.8.3:


Oliver Tonnhofer <olt at omniscale.de>
Omniscale - Dominik Helle, Oliver Tonnhofer GbR
Nadorster Str. 60, 26123 Oldenburg
Tel: +49(0)441/9392774-2 (Fax: 9)

More information about the MapProxy mailing list