*
*
|
|
Google Maps API
The Google Maps API is quite interesting.
Google won't provide a map unless a unique key is provided for each URL that requests the map,
which includes the complete domain/subdomain/subdirectory and port of the web server that
displays the page - and the URL is case sensitive.
This means that our key will not work on your server.
Basic Map
Here is a code fragment for a simple search. We have pasted in our
Google Maps key for you:
|
<script
src="http://maps.google.com/maps?file=api&v=1&key=ABQI...twwQ"
type="text/javascript"></script>
<div id="map" style="width: 500px; height: 400px"></div>
<script type="text/javascript">
//<![CDATA[
var map = new GMap(document.getElementById("map"));
map.addControl(new GSmallMapControl());
map.centerAndZoom(new GPoint(-122.1419, 37.4419), 4);
//]]>
</script> |
Output

Satellite/Map Control Buttons
|
<script
src="http://maps.google.com/maps?file=api&v=1&key=ABQI...twwQ"
type="text/javascript"></script>
<div id="map" style="width: 500px; height: 400px"></div>
<script type="text/javascript">
//<![CDATA[
var map = new GMap(document.getElementById("map"));
map.addControl(new GSmallMapControl());
map.addControl(new GMapTypeControl());
map.centerAndZoom(new GPoint(-122.1419, 37.4419), 4);
//]]>
</script> |
Output
After clicking on the satellite button, you should see:

|