GeoWebCache - Issues with tile origins when setting alignTopLeft=true for a gridSet
I'm finding an unexpected behavior when setting *alignTopLeft=true* at
*geowebcache.xml* for a gridSet. When I am navigating on a map within the
same cache level everything works fine (even zooming in/out works fine).
However, when the map changes to a different cache level, I am taken
vertically to a different location, as if there was a different y-offset for
each cache level. This behavior has been observed with both *OpenLayers* and
*QGIS*. I believe it has to do with the fact that when /alignTopLeft=false/
you get different tile origins for each cache level, while when
/alignTopLeft=true/, despite the fact that now you get the same tile origin
for all cache levels, somehow the service is internally still using
different tile origins and it doesn't work properly if using the same single
origin. More details below.
At* GeoServer* (both *2.13.1* and *2.15*), I have configured tile caching on
a layer with the formats "image/png" and
"application/x-protobuf;type=mapbox-vector", and assigned the following
gridSet to it:
With the configuration above, everything works fine. I get both WMTS and
Vector Tile layers working fine on OpenLayers, and the WMTS service works
fine in QGIS. However, having multiple tile origins causes me other issues
and I'm trying to configure/force the use of a single tile origin (same for
all cache levels). With that in mind, I changed to
on geowebcache.xml, and that successfully makes all tile origins
(TopLeftCorners) be the same on the WMTS capabilities description, which is
the top left corner of the SRS: [421849.8127979373 968015.3873920501].
However, with this new configuration the layer doesn't behave properly when
displayed neither in OpenLayers nor in QGIS, where you find different
y-offsets for each cache level while navigating on the map, and you are
taken vertically to different locations whenever the cache level changes.
I can confirm that the vector tile layer works again properly in OpenLayers
if I use the same collection of different tile origins associated to
/alignTopLeft=false/ instead of the same tile origin associated to
/alignTopLeft=true/, even when /alignTopLeft=true/ is set. So, it looks like
despite /alignTopLeft=true/ makes all tile origins be the same, in reality
the service won't work properly unless you still use the collection of
different tile origins obtained when /alignTopLeft=false/.