Export 0.1.45
[framework/web/web-ui-fw.git] / libs / js / jquery-geo-1.0a4 / docs / geomap / tilingScheme.html
1 <!doctype html>  
2
3 <html lang="en" class="no-js">
4 <head>
5   <meta charset="utf-8">
6
7   <title>tilingScheme | geomap</title>
8   <meta name="description" content="geomap tilingScheme property">
9   <meta name="author" content="Ryan Westphal">
10
11   <meta name="viewport" content="width=device-width, initial-scale=1.0">
12
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" />
15 </head>
16
17 <body>
18
19   <div id="tilingScheme" data-role="page">
20     <div data-role="header" data-theme="f">
21       <h1>tilingScheme</h1>
22     </div>
23     
24     <div data-role="content">
25       <table>
26         <tr>
27           <th>type</th>
28           <td>Object</td>
29         </tr>
30         <tr>
31           <th>default</th>
32           <td><pre><code>{
33   tileWidth: 256,
34   tileHeight: 256,
35   levels: 18,
36   basePixelSize: 156543.03392799936,
37   pixelSizes: null,
38   origin: [ -20037508.342787, 20037508.342787 ]
39 }</code></pre></td>
40         </tr>
41         <tr>
42           <th>init</th>
43           <td><code><pre>$( <i>selector</i> ).geomap( { tilingScheme: {
44   tileWidth: 256,
45   tileHeight: 256,
46   levels: 18,
47   basePixelSize: 156543.03392799936,
48   pixelSizes: null,
49   origin: [ -20037508.342787, 20037508.342787 ]
50 } } );</pre></code></td>
51         </tr>
52         <tr>
53           <th>get</th>
54           <td><code><pre>var tilingScheme = $( <i>selector</i> ).geomap( &quot;option&quot;, &quot;tilingScheme&quot; );</pre></code></td>
55         </tr>
56         <tr>
57           <th>set</th>
58           <td><code><pre>$( <i>selector</i> ).geomap( &quot;option&quot;, &quot;tilingScheme&quot;, null );</pre></code></td>
59         </tr>
60       </table>
61       <p>The tilingScheme property defines a grid that the geomap widget can use to build a map view as adjacent tiles instead of a single, full image each time.</p>
62       <p>Only tiled services will get a non-null tile property as an argument to their src method or template. Shingled services, even when layered on top of a tiled map will only get bbox data.</p>
63       <p>When a tilingScheme is set, the geomap widget will limit the user to specific zoom levels defined by the tiling scheme.</p>
64       <p>You can set the map widget to be fully dynamic and allow any arbitrary zoom level by setting the tilingScheme to null. This is only useful if all of your services are backed by live spatial data and can produce map images at any scale.</p>
65       <p>This is one of the few places where you must use non-geodetic (i.e., non-lon/lat) units even if you are using longitude &amp; latitude for properties such as center or bbox. You must use projected units when defining a tiling scheme. The default map tiles use web mercator meters.</p>
66       <p>
67       All tilingScheme objects have the first three of the following properties. Apart from those, a tilingScheme object must have either <b>just</b> the pixelSizes property or <b>both</b> basePixelSize &amp; levels.</p>
68       <table>
69         <tr><th>tileWidth (Number)</th><td>the width in pixels of a single tile</td></tr>
70         <tr><th>tileHeight (Number)</th><td>the height in pixels of a single tile</td></tr>
71         <tr><th>origin (Array&lt;Number&gt;)</th><td>a <a href="http://geojson.org/geojson-spec.html#positions" rel="external">GeoJSON position</a> for the top-left corner of the map tiles in map units, this is used to correctly position tiles into the map view</td></tr>
72         <tr><th>pixelSizes (Array&lt;Number&gt;)</th><td>an array of all pixel sizes (called resolutions on Esri's products) hosted by the map service, each one represents a zoom level therefore the total number of zoom levels equals the length of the pixelSizes array</td></tr>
73         <tr><th>basePixelSize (Number)</th><td>the pixelSize represented by the tiles on zoom level 0, used when each pixelSize is a power of two smaller than the previous one</td></tr>
74         <tr><th>levels (Number)</th><td>the total number of pixelSizes allowed, used in conjuction with basePixelSize to determine how far a user is allowed to zoom</td></tr>
75       </table>
76     </div>
77   </div> <!-- end of #container -->
78
79   <script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
80   <script src="http://code.jquerygeo.com/jquery.geo-1.0a4.min.js"></script>
81   <script src="../js/script.js"></script>
82   <script src="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.js"></script>
83 </body>
84 </html>
85