Ticket #1302 (assigned feature)
Add a gridOrigin parameter to align the grid to the grid of a WMS-C server.
|Reported by:||pascalou||Owned by:||crschmidt|
|Keywords:||wmsc grid origin alignment||Cc:||pascal.pons@…|
|State:||Needs More Work|
- Motivation of this feature:
We want to use a WMS-C source ( http://wiki.osgeo.org/index.php/WMS_Tile_Caching, http://wiki.osgeo.org/index.php/WMS_Tiling_Client_Recommendation). We used the regular WMS Openlayer layer. The problem is that a WMSC server only serve tiles that are exactly aligned to its specific cache grid. Grids.js uses the bottom left corner of the map.maxextent as the origin of the grid, which is unfortunately not the case of our WMS-C server: our origin is (0,0).
Compute the offsets of the requested tiles from a specified gridOrigin. If gridOrigin is not specified, use the previous map.maxExtent origin. This allows to align the requested tiles to a grid origin imposed by the WMS-C server.
- Changes to API:
Add a new optional Api Property on Grid giving the LonLat grid origin.
- Suggested strategies:
I made a very small patch on Grid.js that add a gridOrigin ApiProperty. I don't know if the variable can be simply named "origin" but this variable seems to be used on line 339 "this.origin = new OpenLayers.Pixel(tileoffsetx, tileoffsety);". I don't understand, this line that seems to be useless in the code ??
Add a specific WMS-C layer class that will manage the alignment of the requested tiles ?
- Sideaffects or complications:
I don't have a sufficient overview of the project to see Sideaffects. But it seems to be a very minor modifications.