Return to Snippet

Revision: 57813
at June 11, 2012 08:27 by FatFolderDesigner

Initial Code
window.onload = function(){
		var geocoder = new google.maps.Geocoder();
		geocoder.geocode({'address':'5510 University Way NE  Seattle, WA 98105'},function(result,status){
				var map = new google.maps.Map(document.getElementById("the_map"),{
					'center': result[0].geometry.location,
					'zoom': 14,
					'streetViewControl': false,
				    'mapTypeId': google.maps.MapTypeId.TERRAIN,
				new google.maps.Marker({
					'map': map,
					'position': result[0].geometry.location,
				alert('Address not found!');

Initial URL

Initial Description
This javascript will create a google map on the div with the ID "the_map" and centered on an address with a marker on it. In this example the address is for Jet City Improv. More information on setup and customization at the link.

Initial Title
Google Maps API V3 Javascript Basic Example

Initial Tags
javascript, google

Initial Language