[MapProxy] TMS layer with mixed tiles in leaflet

Oliver Tonnhofer olt at omniscale.de
Tue Jul 2 05:00:40 PDT 2013


Hi,

On 02.07.2013, at 13:45, Gis Mage wrote:
> If I set up a mapproxy source like this:
> 
>   mymap_src:
>     type: tile
>     grid: GLOBAL_MERCATOR
>     url: http://myhost:8080/tilemill-tiles/tile/MyMap/%(z)s/%(x)s/%(y)s.%(format)s?updated=1372699691000&metatile=8&scale=1
> 
> I get reversed Y on MapProxy demo page. So I set up a new grid with another origin:
> 
>   gmerc:
>     base: GLOBAL_MERCATOR
>     origin: nw
> 
> And set my source and cache to use this grid. Then it looks ok on the demo page. But when I add TMS layer to Leaflet map, tiles get mixed up (and that's not just flipped Y). If I add the same layer as WMS (L.TileLayer.WMS), everything looks ok. But I want just to serve tiles.


You only flipped the incoming tiles. TMS uses sw/ll origin as defined by the standard, no matter what the cache is configured to use. You need to use the /tiles service with origin=nw or you need to set the origin: 'nw' option in the TMS service configuration. Or just use WMTS.

See: http://mapproxy.org/docs/nightly/services.html#google-maps


Regards,
Oliver


More information about the MapProxy mailing list