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>
<div id="map"></div>
CSS
#map{
width: 450px;
height: 400px;
}
JavaScript
var lat = 21.95;
var lon = 72.85;
function showMap(lat, lon){
alert("latitude = " + lat + "\nlongitude = " + lon);
var latlng = new google.maps.LatLng(lat, lon);
var settings = {
zoom: 15,
center: latlng,
mapTypeControl: true,
mapTypeControlOptions: {style: google.maps.MapTypeControlStyle.DROPDOWN_MENU},
navigationControl: true,
navigationControlOptions: {style: google.maps.NavigationControlStyle.SMALL},
mapTypeId: google.maps.MapTypeId.ROADMAP};
var map = new google.maps.Map(document.getElementById("map"), settings);
var companyPos = new google.maps.LatLng(lat, lon);
var companyMarker = new google.maps.Marker({
position: companyPos,
map: map,
//icon: companyImage,
//shadow: companyShadow,
title:"H𧥮haug",
zIndex: 3});
}
showMap(lat, lon);
setInterval(function(){
lat++; //new latitude
lon++; //new longitued
showMap(lat, lon);
}, 30000);