2.0_beta sync to rsa
[framework/web/web-ui-fw.git] / libs / js / jquery-geo-1.0a4 / docs / geo / index.html
1 <!doctype html>  
2
3 <html lang="en" class="no-js">
4 <head>
5   <meta charset="utf-8">
6
7   <title>geo namespace | $.geo</title>
8   <meta name="description" content="$.geo namespace">
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="geo" data-role="page">
20     <div data-role="header" data-theme="d">
21       <h1>geo namespace</h1>
22     </div>
23     
24     <div data-role="content">
25       <p>The $.geo namespace contains all geometry functions implemented in the plugin and an object having the plugin's four projection functions.</p>
26       <h2>projection</h2>
27       <p>The $.geo namespace has a property named proj which is a JavaScript object having four functions: fromGeodetic, fromGeodeticPos, toGeodetic, and toGeodeticPos. These four functions allow all $.geo static bbox/geometry functions, geomap widget properties, geomap widget events &amp; geomap widget methods (collectively referred to as plugin functions from now on) to work in geodetic (lon, lat) coordinates.</p>
28       <ul data-role="listview" data-inset="true">
29         <li><a href="proj.html">$.geo.proj</a></li>
30       </ul>
31       <h2>geometry operations</h2>
32       <p>Geometry isn't much fun if you can't do anything with it. These functions help you analyze and manipulate bounding boxes and GeoJSON geometry objects. You call them directly from the $.geo namespace:</p>
33       <pre><code>$.geo.distance( point1, point2 )</code></pre>
34
35       <p>Except for a few name changes and switching from an object-oriented API to a function-based one, jQuery Geo attempts to follow the names and behavior of the <a href="http://www.vividsolutions.com/jts/jtshome.htm">Java Topology Suite</a> (JTS), which is the de-facto standard for geometry library APIs. JTS itself is an implementation of the <a href="http://www.opengis.org/techno/specs.htm">OGC Simple Features</a> specification but has made design decisions that improve the API for developers. The most notable of which is having Envelope (called bbox in jQuery Geo and GeoJSON) be its own class type.</p>
36       <h3>bbox functions</h3>
37       <p>These functions operate on <a href="http://geojson.org/geojson-spec.html#bounding-boxes" rel="external">GeoJSON bounding box</a> array, i.e., a JavaScript array having four values:</p>
38       <ul>
39         <li>minimum x/longitude</li>
40         <li>minimum y/latitude</li>
41         <li>maximum x/longitude</li>
42         <li>maximum y/latitude</li>
43       </ul>
44       <ul data-role="listview" data-inset="true">
45         <li><a href="center.html">center</a></li>
46         <li><a href="height.html">height</a></li>
47         <li><a href="width.html">width</a></li>
48         <li><a href="expandBy.html">expandBy</a></li>
49         <li><a href="scaleBy.html">scaleBy</a></li>
50         <li><a href="reaspect.html">reaspect</a></li>
51         <li><a href="recenter.html">recenter</a></li>
52       </ul>
53       <h3>geometry object functions</h3>
54       <p>These functions operate on <a href="http://geojson.org/geojson-spec.html" rel="external">GeoJSON geometry objects</a>: Point, LineString, Polygon, MultiPoint, MultiLineString, MultiPolygon, and GeometryCollection. They do not operate on Feature or FeatureCollection objects, you have to call these functions on the geometry properties of Feature objects.</p>
55       <p>The geometry functions allow you to analyze relationships between geometries such as their distance apart as well as obtain information about them such as bounding box and center point, called the centroid. This section will eventually expand to cover all of the important spatial operations available in the <a href="http://www.vividsolutions.com/jts/jtshome.htm">Java Topology Suite</a>.</p>
56       <ul data-role="listview" data-inset="true">
57         <li><a href="bbox.html">bbox</a></li>
58         <li><a href="distance.html">distance</a></li>
59         <li><a href="length.html">length</a></li>
60         <li><a href="area.html">area</a></li>
61         <li><a href="contains.html">contains</a></li>
62         <li><a href="centroid.html">centroid</a></li>
63         <li><a href="pointAlong.html">pointAlong</a></li>
64       </ul>
65     </div>
66   </div> <!-- end of #container -->
67
68
69   <script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
70   <script src="http://code.jquerygeo.com/jquery.geo-1.0a4.min.js"></script>
71   <script src="../js/script.js"></script>
72   <script src="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.js"></script>
73 </body>
74 </html>
75