[OpenLayers-Commits] r12284 - sandbox/camptocamp/clientzoom/examples

commits-20090109 at openlayers.org commits-20090109 at openlayers.org
Mon Aug 29 08:50:45 EDT 2011


Author: erilem
Date: 2011-08-29 05:50:44 -0700 (Mon, 29 Aug 2011)
New Revision: 12284

Modified:
   sandbox/camptocamp/clientzoom/examples/wmts.html
   sandbox/camptocamp/clientzoom/examples/wmts.js
Log:
better demonstrate "client zoom" in the wmts.html example

Modified: sandbox/camptocamp/clientzoom/examples/wmts.html
===================================================================
--- sandbox/camptocamp/clientzoom/examples/wmts.html	2011-08-29 12:50:33 UTC (rev 12283)
+++ sandbox/camptocamp/clientzoom/examples/wmts.html	2011-08-29 12:50:44 UTC (rev 12284)
@@ -27,27 +27,34 @@
         </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>
+            </p>
 
-                <strong>client zoom</strong> - In this example the OSM layer,
-                which is the base layer, defines
-                19 resolutions, from 156543.0339 to 0.5971. The WMTS layer is
-                   configured as if its WMTS service only supported 18
-                   resolutions, from 156543.0339 to 1.1943 (through the
-                   <code>serverResolutions</code> option). So when the map
-                   changes to the smallest resolution,
-                0.5971, "client zooming" is applied to the WMTS layer, that is
-                  the layer div is transformed client-side to inflate the tiles
-                  and make it so the layer was zoomed.
+            <p>
 
-            </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>
+
                 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-29 12:50:33 UTC (rev 12283)
+++ sandbox/camptocamp/clientzoom/examples/wmts.js	2011-08-29 12:50:44 UTC (rev 12284)
@@ -33,7 +33,7 @@
         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, 2.388657133579254, 1.194328566789627]
+        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]
     });                
 
     map.addLayers([osm, wmts]);



More information about the Commits mailing list