Debian Codegraph @

demos/spinner/latlong.html

raw ◀ ▶
1 Debian patch touch this file
1 <!doctype html>
2 <html lang="en">
3 <head>
4 <meta charset="utf-8">
5 <meta name="viewport" content="width=device-width, initial-scale=1">
6 <title>jQuery UI Spinner - Map</title>
7 <link rel="stylesheet" href="../../themes/base/all.css">
8 <link rel="stylesheet" href="../demos.css">
9 <script src="http://maps.google.com/maps/api/js?sensor=false"></script>
10 <script src="../../external/requirejs/require.js"></script>
•11 <script src="../bootstrap.js" data-modules="/usr/share/javascript/jquery-mousewheel/jquery.mousewheel.js">
12 function latlong() {
13 return new google.maps.LatLng( $("#lat").val(), $("#lng").val() );
14 }
15 function position() {
16 map.setCenter( latlong() );
17 }
18 $( "#lat, #lng" ).spinner({
19 step: .001,
20 change: position,
21 stop: position
22 });
23
24 var map = new google.maps.Map( $("#map")[0], {
25 zoom: 8,
26 center: latlong(),
27 mapTypeId: google.maps.MapTypeId.ROADMAP
28 });
29 </script>
30 <style>
31 #map {
32 width:500px;
33 height:500px;
34 }
35 </style>
36 </head>
37 <body>
38
39 <label for="lat">Latitude</label>
40 <input id="lat" name="lat" value="44.797">
41 <br>
42 <label for="lng">Longitude</label>
43 <input id="lng" name="lng" value="-93.278">
44
45 <div id="map"></div>
46
47 <div class="demo-description">
48 <p>Google Maps integration, using spinners to change latitude and longitude.</p>
49 </div>
50 </body>
51 </html>