jQuery + google maps + Elevation
playing with google maps v3 events, jQuery, icons from http://google-maps-icons.googlecode.com
HTML
<script src="http://maps.google.com/maps/api/js?sensor=false&.js"></script>
<script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false"></script>
<input type="button" value="Auto Rotate" onclick="autoRotate();">
<div id="map-canvas"></div>
CSS
#map-canvas{
width: 450px;
height: 400px;
}
JavaScript
var map;
function initialize() {
var mapOptions = {
center: new google.maps.LatLng(50.77753, 6.07784),
zoom: 18,
mapTypeId: google.maps.MapTypeId.SATELLITE,
heading: 90,
tilt: 100
};
map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions);
}
function rotate90() {
var heading = map.getHeading() || 0;
map.setHeading(heading + 90);
}
function autoRotate() {
// Determine if we're showing aerial imagery
if (map.getTilt() != 0) {
window.setInterval(rotate90, 3000);
}
}
google.maps.event.addDomListener(window, 'load', initialize);