[OpenLayers-Commits] r12311 - sandbox/camptocamp/clientzoom/examples
commits-20090109 at openlayers.org
commits-20090109 at openlayers.org
Thu Sep 1 05:24:44 EDT 2011
Author: erilem
Date: 2011-09-01 02:24:43 -0700 (Thu, 01 Sep 2011)
New Revision: 12311
Modified:
sandbox/camptocamp/clientzoom/examples/clientzoom.html
sandbox/camptocamp/clientzoom/examples/clientzoom.js
Log:
use fractionalZoom in the clientzoom example
Modified: sandbox/camptocamp/clientzoom/examples/clientzoom.html
===================================================================
--- sandbox/camptocamp/clientzoom/examples/clientzoom.html 2011-09-01 07:14:43 UTC (rev 12310)
+++ sandbox/camptocamp/clientzoom/examples/clientzoom.html 2011-09-01 09:24:43 UTC (rev 12311)
@@ -14,12 +14,19 @@
.olControlAttribution {
bottom: 5px;
}
+ #map {
+ width: 512px;
+ height: 512px;
+ }
+ #docs {
+ width: 512px;
+ }
</style>
</head>
<body onload="init();">
<h1 id="title">Client Zoom</h1>
<div id="tags">
- clientzoom
+ client zoom continuous zooming
</div>
<p id="shortdesc">
@@ -29,23 +36,37 @@
</p>
- <div id="map" class="smallmap"></div>
+ <div id="map"></div>
<div id="docs">
<p>
- Ths map is configured with 22 resolutions, while the OSM tile
- server supports only the first 19 resolutions . When the zoom
+ This map is configured with 22 resolutions, while the OSM tile
+ server supports only the first 19 resolutions. When the zoom
level is 19, 20 or 22 "client zoom" is applied on the OSM
- layer, i.e. the OSM layer div is stretched as necessary. The
- map's initial zoom is 18. So if you zoom in or out you'll see
- that "client zoom" is applied.
+ layer, i.e. the OSM layer div is stretched as necessary.
</p>
<p>
+ The map's initial zoom is 18. So if you zoom in using the zoom
+ bar's "+" button you'll see that "client zoom" is applied.
+
+ </p>
+
+ <p>
+
+ The map is even configured with <code>fractionalZoom</code> set
+ to true. So "client zoom" also applies if you choose arbitrary
+ zoom levels using the slider of the zoom bar, or shift-drag
+ boxes to zoom to arbitrary extents.
+
+ </p>
+
+ <p>
+
Enabling "client zoom" on a layer is done through the
<code>serverResolutions</code> option. See the <a
href="clientzoom.js" target="_blank"> clientzoom.js source</a>
Modified: sandbox/camptocamp/clientzoom/examples/clientzoom.js
===================================================================
--- sandbox/camptocamp/clientzoom/examples/clientzoom.js 2011-09-01 07:14:43 UTC (rev 12310)
+++ sandbox/camptocamp/clientzoom/examples/clientzoom.js 2011-09-01 09:24:43 UTC (rev 12311)
@@ -8,7 +8,9 @@
units: "m",
maxExtent: new OpenLayers.Bounds(
-20037508.34, -20037508.34, 20037508.34, 20037508.34
- )
+ ),
+ controls: [],
+ fractionalZoom: true
});
var osm = new OpenLayers.Layer.OSM(null, null, {
@@ -17,6 +19,10 @@
});
map.addLayers([osm]);
- map.addControl(new OpenLayers.Control.LayerSwitcher());
+ map.addControls([
+ new OpenLayers.Control.Navigation(),
+ new OpenLayers.Control.Attribution(),
+ new OpenLayers.Control.PanZoomBar()
+ ]);
map.setCenter(new OpenLayers.LonLat(667393.040812,lat=5668008.8022737), 18);
}
More information about the Commits
mailing list