[OpenLayers-Commits] r12301 - sandbox/camptocamp/clientzoom/examples
commits-20090109 at openlayers.org
commits-20090109 at openlayers.org
Wed Aug 31 07:39:41 EDT 2011
Author: erilem
Date: 2011-08-31 04:39:40 -0700 (Wed, 31 Aug 2011)
New Revision: 12301
Modified:
sandbox/camptocamp/clientzoom/examples/wmts.html
sandbox/camptocamp/clientzoom/examples/wmts.js
Log:
go back to trunk version of wmts example
Modified: sandbox/camptocamp/clientzoom/examples/wmts.html
===================================================================
--- sandbox/camptocamp/clientzoom/examples/wmts.html 2011-08-31 11:35:17 UTC (rev 12300)
+++ sandbox/camptocamp/clientzoom/examples/wmts.html 2011-08-31 11:39:40 UTC (rev 12301)
@@ -27,34 +27,14 @@
</p>
<div id="map" class="smallmap"></div>
-
+
<div id="docs">
<p>
This example uses an OpenLayers.Layer.WMTS layer to display
cached tiles over an OSM layer in spherical mercator coordinates.
- </p>
-
- <p>
-
- This example demonstrates the <strong>"client zoom"</strong>
- functionality.
-
- The map works with 19 resolutions. But the WMTS layer is
- configured as its WMTS service supported only 17 of these
- resolutions. The resolutions for the zoom levels 16 and 18 are
- indeed not included in the WMTS layer's
- <code>serverResolutions</code> option.
-
- The map's initial zoom is 17. So if you zoom in or out
- you'll see that "client zoom" is applied.
-
- </p>
-
- <p>
-
+ </p><p>
See the <a href="wmts.js" target="_blank">
wmts.js source</a> to see how this is done.
-
</p>
</div>
</body>
Modified: sandbox/camptocamp/clientzoom/examples/wmts.js
===================================================================
--- sandbox/camptocamp/clientzoom/examples/wmts.js 2011-08-31 11:35:17 UTC (rev 12300)
+++ sandbox/camptocamp/clientzoom/examples/wmts.js 2011-08-31 11:39:40 UTC (rev 12301)
@@ -8,14 +8,12 @@
units: "m",
maxExtent: new OpenLayers.Bounds(
-20037508.34, -20037508.34, 20037508.34, 20037508.34
- )
+ ),
+ maxResolution: 156543.0339
});
- var osm = new OpenLayers.Layer.OSM(null, null, {
- resolutions: [156543.03390625, 78271.516953125, 39135.7584765625, 19567.87923828125, 9783.939619140625, 4891.9698095703125, 2445.9849047851562, 1222.9924523925781, 611.4962261962891, 305.74811309814453, 152.87405654907226, 76.43702827453613, 38.218514137268066, 19.109257068634033, 9.554628534317017, 4.777314267158508, 2.388657133579254, 1.194328566789627, 0.5971642833948135]
- });
+ var osm = new OpenLayers.Layer.OSM();
-
// If tile matrix identifiers differ from zoom levels (0, 1, 2, ...)
// then they must be explicitly provided.
var matrixIds = new Array(26);
@@ -32,11 +30,11 @@
format: "image/png",
style: "_null",
opacity: 0.7,
- isBaseLayer: false,
- serverResolutions: [156543.03390625, 78271.516953125, 39135.7584765625, 19567.87923828125, 9783.939619140625, 4891.9698095703125, 2445.9849047851562, 1222.9924523925781, 611.4962261962891, 305.74811309814453, 152.87405654907226, 76.43702827453613, 38.218514137268066, 19.109257068634033, 9.554628534317017, 4.777314267158508, 1.194328566789627]
+ isBaseLayer: false
});
map.addLayers([osm, wmts]);
map.addControl(new OpenLayers.Control.LayerSwitcher());
- map.setCenter(new OpenLayers.LonLat(-13677832, 5213272), 17);
+ map.setCenter(new OpenLayers.LonLat(-13677832, 5213272), 13);
+
}
More information about the Commits
mailing list