From 52a105c3aa69e33d1c7bf162cf260d45ef3eb107 Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Wed, 5 Jan 2011 17:37:58 +0000 Subject: [PATCH] Adding the tile extent examples as part of #3002. git-svn-id: http://svn.openlayers.org/trunk/openlayers@11005 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- examples/tile-extent.html | 36 ++++++++++++++++++++++++++++++++++++ examples/tile-extent.js | 16 ++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 examples/tile-extent.html create mode 100644 examples/tile-extent.js diff --git a/examples/tile-extent.html b/examples/tile-extent.html new file mode 100644 index 0000000000..4f69243853 --- /dev/null +++ b/examples/tile-extent.html @@ -0,0 +1,36 @@ + + + + OpenLayers Tile Extent Example + + + + + +

Tile Extent

+
+ grid, tileExtent +
+

+ Demonstrates the use of the tileExtent property to differentiate + between the maximum extent and the tile extent for a layer. +

+
+
+

+ This example uses a layer that requests map tiles from a WMS + that only generates image responses for requests that align with + a particular tile lattice. In this case, the layer's + maxExtent does not align with that tile lattice. + To configure the layer with a tile extent that conforms to the + tile extent configured on the server, use the layer's + tileExtent property. +

+ View the tile-extent.js + source to see how this is done +

+
+ + + + diff --git a/examples/tile-extent.js b/examples/tile-extent.js new file mode 100644 index 0000000000..953b2e1db4 --- /dev/null +++ b/examples/tile-extent.js @@ -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"}, + {tileExtent: new OpenLayers.Bounds(-180, -90, 180, 90)} + ) + ], + center: new OpenLayers.LonLat(-110, 45), + zoom: 0 +});