Hello Arne,
Thanks for the answer.
I tried with and without tileOrigin parameter, and there was absolutely no difference in the result.
Although I won’t say I fully understand what you wrote about the “inconsistent grid definition”, I tried to make a gridset using resolutions like this: rb = ra/2. Unfortunately the result was again the same, at some zoom levels the offset is visible, at another levels it fits just fine.
This is my (modified) map object (I use GeoExt 1.1 and Heron 1.0.1):
huBox = [420000, 40000, 950000, 370000];
Heron.options.map.settings = {
projection: ‘EPSG:23700’,
displayProjection: ‘EPSG:23700’,
units: ‘m’,
maxExtent: new OpenLayers.Bounds(huBox[0], huBox[1], huBox[2], huBox[3]),
scales: [4000000, 2000000, 1000000, 500000, 250000, 125000, 62500, 31250, 15625],
xy_precision: 2
};
I attach the modified EPSG:23700 gridset definition where all the zoom levels, resolutions and tiles are visible (gridset.png).
I’m thinking that maybe the datum parameters are not the same that OpenLayers and GeoServer uses. OpenLayers gets it from Proj4js, here is the def:
Proj4js.defs[“EPSG:23700”] = “+proj=somerc +lat_0=47.14439372222222 +lon_0=19.04857177777778 +k_0=0.99993 +x_0=650000 +y_0=200000 +ellps=GRS67 +units=m +no_defs”;
And here is the definition from GeoServer:
But because NOT every zoom levels produce misplacement I don’t really think that the datum definition causes it.
Gergely

···
2014-05-26 22:18 GMT+02:00 Arne Kepp <arne@anonymised.com>:
If you want to make it easy for yourself, don’t set the tilesorigin property; use the same extent for both GWC and for the base layer (and thus all other layers, by default) in the OpenLayers client.
The tilesorigin is tricky because you can define it to be an integer number of tiles from the extent for one resolution, but probably not for all resolutions (unless they’re just rb = ra / 2).
For those other resolutions you have an inconsistent grid definition, so the client has to ignore either the tilesorigin, adjust the resolution or adjust the extent. It will probably ignore the extent you gave it. But the GridSets in GWC don’t have a tilesorigin, so GWC will just return the closest tile aligned to the original extent.
-Arne
On 26/05/14 17:43 , fegyi001 wrote:
Dear Users!
I have a big problem with cached tiles. In my web application I wish to
store and access visited tiles through GoeWebCache.
In the web client (OpenLayers 2.13.1), however, with some zoom levels there
is a massive misplacement of the tiles.
I use EPSG:23700 everywhere: all my layers (vectors stored in PostGIS,
GeoTIFFs stored in GeoServer) and also OpenLayers uses it.
The strange thing is, that at some zoom levels everything is fine, but when
I zoom one more step in, the misplacement becomes visible again. After
another zoom the misplacement disappears, and then appears again (this
sounds very “patternish”, but there is no pattern of its behaviour).
Please look at the attached images.
In GeoServer I created a new Gridset for my EPSG:23700, it has the very same
zoom levels than the OpenLayers.Map has.
In OpenLayers I also added the tileOrigin property to the layer which is has
the minx, miny values of the layer’s extent (calculated by GeoServer).
At Caching Defaults I checked the “Enable direct integration with GeoServer
WMS” option, so I can use the default GeoServer wms url.
The cached layer is configured so that it accepts the EPSG:23700 gridset
(“Tile Caching” option).
I ran out of ideas. Can anyone help? My GeoServer version is 2.4.4.
Best
Gergely
<http://osgeo-org.1560.x6.nabble.com/file/n5142563/01.jpg>
<http://osgeo-org.1560.x6.nabble.com/file/n5142563/02.jpg>
<http://osgeo-org.1560.x6.nabble.com/file/n5142563/03.jpg>
<http://osgeo-org.1560.x6.nabble.com/file/n5142563/04.jpg>
<http://osgeo-org.1560.x6.nabble.com/file/n5142563/05.jpg>
–
View this message in context: http://osgeo-org.1560.x6.nabble.com/GeoWebCache-misplacement-tp5142563.html
Sent from the GeoServer - User mailing list archive at Nabble.com.
The best possible search technologies are now affordable for all companies.
Download your FREE open source Enterprise Search Engine today!
Our experts will assist you in its installation for $59/mo, no commitment.
Test it for FREE on our Cloud platform anytime!
http://pubads.g.doubleclick.net/gampad/clk?id=145328191&iu=/4140/ostg.clktrk
Geoserver-users mailing list
Geoserver-users@anonymised.comsourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users