<div dir="auto">Thanks Olivier, I missed that singularity of the TMS spec, because TileStache and Mapcache don't adhere strictly to it.<div dir="auto"><br></div><div dir="auto">And I thought that the tiles service was working for cached tiles, not for "live caching".</div><div dir="auto">Maybe it would be useful to have a specific paragraph for this service with a reference to the "XYZ" tile format (as OL and many others call it).</div><div dir="auto"><br></div><div dir="auto">Cheers,</div><div dir="auto">Giovanni</div></div><div class="gmail_extra"><br><div class="gmail_quote">Il 20 giu 2017 08:26, "Oliver Tonnhofer" <<a href="mailto:olt@omniscale.de">olt@omniscale.de</a>> ha scritto:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
the TMS spec comes with its own definition of a mercator tile grid and this starts with four tiles in zoom level 0.<br>
<br>
You need to use the /tile or /wmts endpoint. Please read <a href="https://mapproxy.org/docs/nightly/services.html#tiled-map-services-tms" rel="noreferrer" target="_blank">https://mapproxy.org/docs/<wbr>nightly/services.html#tiled-<wbr>map-services-tms</a> for more information<br>
<br>
Regards,<br>
Oliver<br>
<br>
--<br>
Oliver Tonnhofer | Omniscale GmbH & Co KG | <a href="https://omniscale.com" rel="noreferrer" target="_blank">https://omniscale.com</a><br>
OpenStreetMap WMS and tile services | <a href="https://maps.omniscale.com" rel="noreferrer" target="_blank">https://maps.omniscale.com</a><br>
<br>
<br>
<br>
<br>
<br>
> On 14.06.2017, at 09:46, G. Allegri <<a href="mailto:giohappy@gmail.com">giohappy@gmail.com</a>> wrote:<br>
><br>
> Hi,<br>
> I'm using OL 3/4 for an application where a TMS layer is defined:<br>
><br>
> new ol.layer.Tile({<br>
> source: new <a href="http://ol.source.XYZ" rel="noreferrer" target="_blank">ol.source.XYZ</a>({<br>
> url: "<a href="http://localhost:8080/tms/1.0.0/mylayer/webmercator/{z}/{x}/{-y}.png" rel="noreferrer" target="_blank">http://localhost:8080/tms/1.<wbr>0.0/mylayer/webmercator/{z}/{<wbr>x}/{-y}.png</a>",<br>
> })<br>
> })<br>
><br>
> (the inverted "y" in a XYZ layer makes it behave as a TMS layer).<br>
><br>
> The map is EPSG:3857 and the layer source (WMS service) is also EPSG:3857<br>
><br>
> This OL app works perfectly with other cache tools, like mapcache, with a standard mercator grid.<br>
> When I use it with MapProxy things get wrong becasue TileServiceGrid skips the first level for GLOBAL_(WEB)MERCATOR : <a href="https://github.com/mapproxy/mapproxy/blob/master/mapproxy/service/tile.py#L381" rel="noreferrer" target="_blank">https://github.com/mapproxy/<wbr>mapproxy/blob/master/mapproxy/<wbr>service/tile.py#L381</a><br>
><br>
> If self._skip_first_level is forced to False everything goes fine.<br>
><br>
> I noticed that even in you OpenLayers 2 Demo you start resolutions from 78271.516964, which is the second level of the the classical mercator grid.<br>
><br>
> My questions are:<br>
><br>
> - why is the first level skipped?<br>
> - how could I define a GLOBAL_WEBMERCATOR grid without skipping the first level? I don't want to force it at level of (internal) code, obviusoly.<br>
><br>
> Thanks so much,<br>
> Giovanni<br>
><br>
> ______________________________<wbr>_________________<br>
> MapProxy mailing list<br>
> <a href="mailto:MapProxy@lists.osgeo.org">MapProxy@lists.osgeo.org</a><br>
> <a href="https://lists.osgeo.org/mailman/listinfo/mapproxy" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/mapproxy</a><br>
<br>
</blockquote></div></div>