cd5a29210dfd7d408e7906907b8c7713478d28ff
[framework/web/web-ui-fw.git] / libs / js / jquery-geo-1.0a4 / docs / geomap / center.html
1 <!doctype html>  
2
3 <html lang="en" class="no-js">
4 <head>
5   <meta charset="utf-8">
6
7   <title>center | geomap</title>
8   <meta name="description" content="geomap center 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="center" data-role="page">
20     <div data-role="header" data-theme="f">
21       <h1>center</h1>
22     </div>
23     
24     <div data-role="content">
25       <table>
26         <tr>
27           <th>type</th>
28           <td>Array (<a href="http://geojson.org/geojson-spec.html#positions" rel="external">GeoJSON position</a>)</td>
29         </tr>
30         <tr>
31           <th>default</th>
32           <td>[ 0, 0 ]</td>
33         </tr>
34         <tr>
35           <th>init</th>
36           <td><code><pre>$( <i>selector</i> ).geomap( { center: [ 0, 0 ] } );</pre></code></td>
37         </tr>
38         <tr>
39           <th>get</th>
40           <td><code><pre>var center = $( <i>selector</i> ).geomap( &quot;option&quot;, &quot;center&quot; );</pre></code></td>
41         </tr>
42         <tr>
43           <th>set</th>
44           <td><code><pre>$( <i>selector</i> ).geomap( &quot;option&quot;, &quot;center&quot;, [ -71.037598, 42.363281 ] );</pre></code></td>
45         </tr>
46       </table>
47       <p>The center property gets or sets the center point of the map. By default the value is in geodetic coordinates, e.g., longitude, latitude. You can change the default when you initialize the widget by passing projected coordinates as the center option.</p>
48       <p>Setting a new center point will refresh the map services.</p>
49       <p>If you attempt to initialize both center and bbox at the same time when creating a geomap widget, center will override bbox.</p>
50     </div>
51   </div> <!-- end of #container -->
52
53   <script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
54   <script src="http://code.jquerygeo.com/jquery.geo-1.0a4.min.js"></script>
55   <script src="../js/script.js"></script>
56   <script src="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.js"></script>
57 </body>
58 </html>
59