2011-08-07 16:59:50 +00:00
|
|
|
<!doctype html>
|
2011-08-07 15:34:28 +00:00
|
|
|
<html lang="en">
|
|
|
|
<head>
|
|
|
|
<meta charset="utf-8">
|
|
|
|
<title>jQuery UI Spinner - Map</title>
|
2011-08-07 16:59:50 +00:00
|
|
|
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
|
|
|
|
<script src="http://maps.google.com/maps/api/js?sensor=false"></script>
|
2011-11-09 15:18:33 +00:00
|
|
|
<script src="../../jquery-1.7.js"></script>
|
2011-08-07 16:59:50 +00:00
|
|
|
<script src="../../external/jquery.mousewheel-3.0.4.js"></script>
|
|
|
|
<script src="../../ui/jquery.ui.core.js"></script>
|
|
|
|
<script src="../../ui/jquery.ui.widget.js"></script>
|
|
|
|
<script src="../../ui/jquery.ui.button.js"></script>
|
|
|
|
<script src="../../ui/jquery.ui.spinner.js"></script>
|
|
|
|
<link rel="stylesheet" href="../demos.css">
|
|
|
|
<script>
|
2011-08-07 15:34:28 +00:00
|
|
|
$(function() {
|
|
|
|
function latlong() {
|
2011-08-07 16:59:50 +00:00
|
|
|
return new google.maps.LatLng( $("#lat").val(), $("#lng").val() );
|
2011-08-07 15:34:28 +00:00
|
|
|
}
|
|
|
|
function position() {
|
2011-08-07 16:59:50 +00:00
|
|
|
map.setCenter( latlong() );
|
2011-08-07 15:34:28 +00:00
|
|
|
}
|
2011-08-07 16:59:50 +00:00
|
|
|
$( "#lat, #lng" ).spinner({
|
2011-09-14 13:49:17 +00:00
|
|
|
step: .001,
|
|
|
|
change: position,
|
|
|
|
stop: position
|
2011-08-07 15:34:28 +00:00
|
|
|
});
|
2011-08-07 16:59:50 +00:00
|
|
|
|
|
|
|
var map = new google.maps.Map( $("#map")[0], {
|
2011-08-07 15:34:28 +00:00
|
|
|
zoom: 8,
|
|
|
|
center: latlong(),
|
|
|
|
mapTypeId: google.maps.MapTypeId.ROADMAP
|
|
|
|
});
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
<style>
|
2011-08-07 16:59:50 +00:00
|
|
|
#map {
|
|
|
|
width:500px;
|
|
|
|
height:500px;
|
|
|
|
}
|
2011-08-07 15:34:28 +00:00
|
|
|
</style>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
|
|
|
|
<div class="demo">
|
|
|
|
|
|
|
|
<label for="lat">Latitude</label>
|
2011-09-14 13:49:17 +00:00
|
|
|
<input id="lat" name="lat" value="44.797">
|
2011-08-07 16:59:50 +00:00
|
|
|
<br>
|
2011-08-07 15:34:28 +00:00
|
|
|
<label for="lng">Longitude</label>
|
2011-09-14 13:49:17 +00:00
|
|
|
<input id="lng" name="lng" value="-93.278">
|
2011-08-07 15:34:28 +00:00
|
|
|
|
|
|
|
<div id="map"></div>
|
|
|
|
|
|
|
|
</div><!-- End demo -->
|
|
|
|
|
2011-08-07 16:59:50 +00:00
|
|
|
|
|
|
|
|
2011-08-07 15:34:28 +00:00
|
|
|
<div class="demo-description">
|
2011-08-07 16:59:50 +00:00
|
|
|
<p>Google Maps integration, using spinners to change latidude and longitude.</p>
|
2011-08-07 15:34:28 +00:00
|
|
|
</div><!-- End demo-description -->
|
|
|
|
|
|
|
|
</body>
|
|
|
|
</html>
|