How to Create Google Maps Application
Google Maps is the epitome of Web 2.0. Unlike its predecessors, Google Maps provides an application programming interface (API) that allows programmers to combine Google technology with publicly available and proprietary data to create stunning new applications. Best of all, Google provides it all--free of charge--to anyone who knows how to put together a webpage.
Instructions
-
-
1
Get a Google API developer key. Go to http://code.google.com/apis/maps/signup.html and sign up for an account. Google will send you an API key that you can use to access its services.
-
2
Add the Google AJAX API to your webpage by including the following code in your page's <head> element:
<script type="text/javascript" src="http://www.google.com/jsapi?key=ABCDEFG"></script>
-
-
3
Make an element to contain the map on your webpage, somewhere in the <body> section:
<div id="myMap"></div>
-
4
Use the AJAX API to load the Maps API and create a Map2 object by adding this JavaScript to your page:
google.load("maps", "2");
var myMap;
google.setOnLoadCallback(function()
{
myMap = new google.maps.Map2(document.getElementById("myMap"));
}); -
5
Use the Google Maps API to add the features you want to your Map2 object, myMap. See http://code.google.com/apis/maps/documentation.
-
1