Revert "Export"
[framework/web/web-ui-fw.git] / libs / js / jquery-geo-1.0a4 / docs / examples / measure.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4   <meta charset="utf-8">
5   <title>measure example</title>
6   <meta name="viewport" content="width=device-width, minimum-scale=1, maximum-scale=1">
7   <meta name="description" content="An example of measure">
8   <meta name="author" content="Ryan Westphal">
9   <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/themes/blitzer/jquery-ui.css" />
10   <link rel="stylesheet" type="text/css" href="css/style.css" />
11   <style type="text/css">
12     #map
13     {
14       position: fixed;
15       left: 0;
16       top: 0;
17       right: 0;
18       bottom: 0;
19     }
20   </style>
21 </head>
22 <body>
23   <div>
24     <div id="map">
25     </div>
26     <div class="info">
27       <div class="links">
28         <a href="../" class="docLink">&lt; docs</a>
29         <a href="http://jsfiddle.net/ryanttb/==JSFIDDLE==/embedded/" class="fiddleLink"><img src="img/jsfiddle.png" alt="" /> jsFiddle &gt;</a>
30       </div>
31       <h1>measure</h1>
32       <p class="not-mobile">This example tests the two measure modes: measureLength, and measureArea. Choose a tool below and start measuring!</p>
33       <div id="modes">
34         <input type="radio" id="measureLength" name="mode" value="measureLength" checked="checked" /><label for="measureLength">length</label>
35         <input type="radio" id="measureArea" name="mode" value="measureArea" /><label for="measureArea">area</label>
36       </div>
37     </div>
38   </div>
39   <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
40   <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js"></script>
41   <!--<script src="http://code.jquerygeo.com/jquery.geo-1.0a4.min.js"></script>-->
42   <script src="../jquery.geo-test.min.js"></script>
43   <script>
44     $(function () {
45       // create a map
46       var map = $("#map").geomap({
47         center: [-71.0595678, 42.3604823],
48         zoom: 8,
49         mode: "measureLength",
50         measureLabels: {
51           distance: "{{=length.toFixed( 4 )}} meters"
52         },
53         drawStyle: {
54           color: "blue"
55         }
56       });
57
58       // jQuery UI for pretty buttons
59       $("#modes").buttonset();
60
61       $("#modes input").click(function () {
62         // set the map's mode option based on value of the input clicked
63         // this will change the map's mode to measureLength or measureArea
64         map.geomap("option", "mode", $(this).val());
65       });
66     });  
67   </script>
68
69   <script>
70     var _gaq = [['_setAccount', 'UA-26084853-1'], ['_trackPageview']];
71     (function (d, t) {
72       var g = d.createElement(t), s = d.getElementsByTagName(t)[0]; g.async = 1;
73       g.src = ('https:' == location.protocol ? '//ssl' : '//www') + '.google-analytics.com/ga.js';
74       s.parentNode.insertBefore(g, s);
75     } (document, 'script'));
76   </script>
77 </body>
78 </html>