anushani / atlasmapper

Automatically exported from code.google.com/p/atlasmapper
0 stars 0 forks source link

High DPI mode doesn't work with gutter oloptions #55

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Background
At the boundaries of tiles data with icons or labels can get cut-off. To 
overcome this problem a gutter can be used to render into a larger image then 
trim the edges. This is typically used by the GWC when fetching meta-tiles from 
the GeoServer.

However if the same effect is needed when getting the imagery directly from the 
GeoServer we need to perform the guttering in OpenLayers. This can be performed 
using a manual override for a layer and specifying the gutter property in the 
olOptions as per the following example:

"ea_ea:GBR_AIMS_BRUVS_Prize-fish": {
    "cached": false,
    "olOptions": {"gutter": 50}
}

This works fine, except it does work when the DPI is selected greater than 90.

What steps will reproduce the problem?
1. Add a layer override that enables OpenLayers gutter as above. Note the 
caching must also be disabled because the tiles requested will not match the 
standard 256x256 pixels due to the gutter.
2. Update an AtlasMapper client with the layer.
3. Add the layer of interest, then increase the DPI setting from 90 dpi.

What is the expected output? What do you see instead?
The map should appear normal, just bigger, instead the imagery in not placed 
correctly.

What version of the product are you using? On what operating system?
1.3

Original issue reported on code.google.com by eric.law...@gmail.com on 28 Mar 2013 at 3:07

GoogleCodeExporter commented 9 years ago
Need to investigate if there is a workaround this bug by calculating the 
dimension of the tiles by subtracting / adding the gutter width.

Original comment by lafond.g...@gmail.com on 23 Apr 2013 at 4:00

GoogleCodeExporter commented 9 years ago
The bug only occurred when changing the DPI on existing layers with gutter. 
Adding the layer after changing the DPI works as expected.

Workaround:
1. change de map DPI
2. remove & re-add the defective layer(s) 

Original comment by lafond.g...@gmail.com on 28 May 2013 at 6:07

GoogleCodeExporter commented 9 years ago
The bug can be reproduced using OpenLayers and a gutter layer, than modifying 
the DPI of the layer, so it looks like it is a bug in OpenLayers.

NOTE: The DPI of a WMS layer is changed using the method: 
OpenLayers.Layer.WMS.mergeNewParams(). Maybe some method can be called after 
that to force OpenLayers to recalculate the tile sizes.

Original comment by lafond.g...@gmail.com on 12 Jul 2013 at 7:29

GoogleCodeExporter commented 9 years ago
Temporary fix: Automatic fixed tile size for layers with gutter option.

Original comment by lafond.g...@gmail.com on 23 Dec 2013 at 8:08

GoogleCodeExporter commented 9 years ago
Fixed in 1.4.8

Original comment by lafond.g...@gmail.com on 24 Dec 2013 at 1:12