3 <html lang="en" class="no-js">
7 <title>zoom | geomap</title>
8 <meta name="description" content="geomap zoom method">
9 <meta name="author" content="Ryan Westphal">
11 <meta name="viewport" content="width=device-width, initial-scale=1.0">
13 <link rel="stylesheet" href="../css/style.css?v=2">
14 <link rel="stylesheet" href="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.css" />
19 <div id="zoomMethod" data-role="page">
20 <div data-role="header" data-theme="e">
24 <div data-role="content">
32 <td>.geomap( "zoom", Number numberOfLevels )</td>
36 <td><pre><code>$("#map").geomap( "zoom", 1 )
37 $("#map").geomap( "zoom", -2 )</code></pre></td>
40 <p>The zoom method can zoom the map in or out by a given number of zoom levels. Positive values zoom the map in, negative values zoom the map out.</p>
41 <p>This method will not zoom out beyond zoom level 0. If you are using a tiling scheme, this method will not zoom in past the maximum number of zoom levels defined in the tilingScheme property.</p>
42 <p>This method accepts values <b>relative</b> to the map's current zoom level. This is different than the zoom property, which <b>is</b> the map's current zoom level.
43 It might be useful to add an explicit plus sign when using this zoom method.</p>
44 <pre><code>// set the map to zoom level 2
45 $("#map").geomap( "option", "zoom", 2 );
47 // zoom the map in 2 levels from its current zoom
48 $("#map").geomap( "zoom", +2 );</code></pre>
49 <p>This method does not trigger events, not even bboxchange.</p>
50 <p>There is no default value. Passing null or undefined will not change the map's zoom.</p>
52 </div> <!-- end of #container -->
54 <script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
55 <script src="http://code.jquerygeo.com/jquery.geo-1.0a4.min.js"></script>
56 <script src="../js/script.js"></script>
57 <script src="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.js"></script>