Adding support for a tileOrigin property to all gridded layers. If working with a cache of tiles that don't align with the bottom left corner of the layer's maxExtent property, set the layer's tileOrigin property. This change also removes the tileExtent property (not in any release), favoring tileOrigin as the way to determine how the grid is aligned. r=ahocevar (closes #3011).

git-svn-id: http://svn.openlayers.org/trunk/openlayers@11033 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Tim Schaub
2011-01-14 15:56:07 +00:00
parent 3515d23ce7
commit 441a5408cd
4 changed files with 63 additions and 23 deletions

16
examples/tile-origin.js Normal file
View File

@@ -0,0 +1,16 @@
var map = new OpenLayers.Map({
div: "map",
maxExtent: new OpenLayers.Bounds(-130, 30, -80, 55),
maxResolution: 360 / 256 / Math.pow(2, 4),
numZoomLevels: 12,
layers: [
new OpenLayers.Layer.WMS(
"Global Imagery",
"http://maps.opengeo.org/geowebcache/service/wms",
{layers: "bluemarble"},
{tileOrigin: new OpenLayers.LonLat(-180, -90)}
)
],
center: new OpenLayers.LonLat(-110, 45),
zoom: 0
});