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">
28 <a href="../" class="docLink">< docs</a>
29 <a href="http://jsfiddle.net/ryanttb/==JSFIDDLE==/embedded/" class="fiddleLink"><img src="img/jsfiddle.png" alt="" /> jsFiddle ></a>
32 <p class="not-mobile">This example tests the two measure modes: measureLength, and measureArea. Choose a tool below and start measuring!</p>
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>
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>
46 var map = $("#map").geomap({
47 center: [-71.0595678, 42.3604823],
49 mode: "measureLength",
51 distance: "{{=length.toFixed( 4 )}} meters"
58 // jQuery UI for pretty buttons
59 $("#modes").buttonset();
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());
70 var _gaq = [['_setAccount', 'UA-26084853-1'], ['_trackPageview']];
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'));