First press "Render" and then press "Evaluate".
Map goes here
messages
bookmarks
map = new GMap(document.getElementById("maparea")); lng = -117.379; lat = 33.971; zoom = 6; map.centerAndZoom(new GPoint(lng, lat), zoom); map.addControl(new GSmallMapControl()); function button1(event) { lng = +(document.getElementById("lng").value); lat = +(document.getElementById("lat").value); zoom = +(document.getElementById("zoom").value); map.centerAndZoom(new GPoint(lng, lat), zoom); } function button2(event) { marker = new GMarker(new GPoint(lng, lat)); map.addOverlay(marker); marker.openInfoWindowHtml("
SoCal Regional Contest
!"); } var animationTimer3 = null; var animationTimer5 = null; var deltalat; var deltalng; function button3(event) { if (animationTimer3) return; deltalat = +(document.getElementById("deltalat").value); deltalng = +(document.getElementById("deltalng").value); animationTimer3 = setInterval(animiationLoop3, 500); } function animiationLoop3() { var center = map.getCenterLatLng(); map.recenterOrPanToLatLng(new GPoint(center.x + deltalat, center.y + deltalng)); } var bookmark = 1; function button4(event) { var center = map.getCenterLatLng(); var z = map.getZoomLevel(); map.addOverlay(new GMarker(center)); var code = "map.centerAndZoom(new GPoint(" + center.x + "," + center.y + "), " + z + ");"; var html = "
" + bookmark + "
, "; document.getElementById("bookmarks").innerHTML += html; bookmark++; } var delta; function button5(event) { if (animationTimer5) return; step = 1; delta = +(document.getElementById("deltalng").value); animationTimer5 = setInterval(animiationLoop5, 50); } function animiationLoop5() { if (step % 2 == 0) lng += delta; else lng -= delta; if (step % 5 == 0) lat -= 0.00005; map.recenterOrPanToLatLng(new GPoint(lng, lat)); step++; } function button6(event) { GEvent.addListener(map, "moveend", function() { var center = map.getCenterLatLng(); var latLngStr = '(' + center.y + ', ' + center.x + ')'; document.getElementById("message").innerHTML = latLngStr; }); } function stopAnimation(event) { if (animationTimer3) clearTimeout(animationTimer3); if (animationTimer5) clearTimeout(animationTimer5); document.getElementById("deltalat").value = 0.0005; document.getElementById("deltalng").value = 0.0005; animationTimer3 = null; animationTimer5 = null; } document.getElementById("button1").onclick = button1; document.getElementById("button2").onclick = button2; document.getElementById("button3").onclick = button3; document.getElementById("button4").onclick = button4; document.getElementById("button5").onclick = button5; document.getElementById("button6").onclick = button6; document.getElementById("stop").onclick = stopAnimation;
Lat:
Lng:
Zoom:
DeltaLat:
DeltaLng:
data.xml
www.google.com/apis/maps