- 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.
Add a new optional Api Property on Grid giving the LonLat grid origin.
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.