<div dir="ltr">Hi list,<div><br></div><div style>I'm having a problem with displaying mapproxy TMS layer in leaflet. The tiles show up in the wrong order, even if I set L.TileLayer tms option to true.</div><div style><br>
</div><div style>My workflow is simple. I'm generating tiles with Tilemill, and then I want to set up a caching server to cache the generated tiles.</div><div style>I've been using TileStache for that, and the config looked very simple:</div>
<div style><div><br></div><div>"tilemill_layer":</div><div>    {</div><div>       "provider": </div><div><span class="" style="white-space:pre">        </span> {</div><div><span class="" style="white-space:pre"> </span>   "name": "proxy", </div>
<div>          "url": "<a href="http://myhost:8080/tilemill-tiles/tile/MyMap/{Z}/{X}/{Y}.png?updated=1372699691000&metatile=8&scale=1">http://myhost:8080/tilemill-tiles/tile/MyMap/{Z}/{X}/{Y}.png?updated=1372699691000&metatile=8&scale=1</a>"</div>
<div>        }</div><div>    }   </div><div><br></div><div style>Then I added a tile layer from TileStache to leaflet map and it looked ok (just like when I add it directly from Tilemill)</div><div style><br></div><div style>
If I set up a mapproxy source like this:</div><div style><br></div><div style><div>  mymap_src:</div><div>    type: tile</div><div>    grid: GLOBAL_MERCATOR</div><div>    url: <a href="http://myhost:8080/tilemill-tiles/tile/MyMap/%(z)s/%(x)s/%(y)s.%(format)s?updated=1372699691000&metatile=8&scale=1">http://myhost:8080/tilemill-tiles/tile/MyMap/%(z)s/%(x)s/%(y)s.%(format)s?updated=1372699691000&metatile=8&scale=1</a></div>
<div><br></div><div style>I get reversed Y on MapProxy demo page. So I set up a new grid with another origin:</div><div style><div><br></div><div>  gmerc:</div><div>    base: GLOBAL_MERCATOR</div><div>    origin: nw</div>
<div><br></div></div><div style>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.</div>
<div style>I'm sure, I'm not the only one here using Leaflet framework as a client to MapProxy (it's faster and lighter than OpenLayers). Can someone give me a clue?</div><div style><br></div><div style>Nick</div>
</div></div></div>