Here is what my interface looks like. I will have school, restaurant
icon that can be clicked on and the map area above will load with the
local schools or restuarants.
<table style="width:auto;"><tr><td><a href="http://
picasaweb.google.com/lh/photo/fA1SI8Bi10U_1q4waZIpIA?
authkey=iYrBlKtkEDI"><img src="http://lh5.ggpht.com/Stanley.Travis/SL-
djMRZRjI/AAAAAAAAA5A/OBBfJE2dJl4/s400/Picture%202.png" /></a></td></
tr><tr><td style="font-family:arial,sans-serif; font-size:11px; text-
align:right">From <a href="http://picasaweb.google.com/Stanley.Travis/
KidOnWritesFromHOME?authkey=iYrBlKtkEDI">Kid Æon writes from H.O.M.E.</
a></td></tr></table>
Alrite, here's the sample code I have in there:
var geocoder;
var map;
var address = "220 A Avenue, Suite 200 Lake Oswego, OR 97034";
// On page load, call this function
function load()
{
// Create new map object
map = new GMap2(document.getElementById("poner"));
// Create new geocoding object
geocoder = new GClientGeocoder();
// Retrieve location information, pass it to addToMap()
geocoder.getLocations(address, addToMap);
var mapTypeControl = new GMapTypeControl();
var topRight = new GControlPosition(G_ANCHOR_TOP_RIGHT, new
GSize(210,7));
var bottomRight = new GControlPosition(G_ANCHOR_BOTTOM_RIGHT,
new GSize(10,10));
map.addControl(mapTypeControl, topRight);
map.addControl(new GLargeMapControl());
// bind a search control to the map, suppress result list
map.addControl(new google.maps.LocalSearch(), new
GControlPosition(G_ANCHOR_BOTTOM_RIGHT, new GSize(10,20)));
}
// This function adds the point to the map
function addToMap(response)
{
// Retrieve the object
place = response.Placemark[0];
// Retrieve the latitude and longitude
point = new GLatLng(place.Point.coordinates[1],
place.Point.coordinates[0]);
// Center the map on this point
map.setCenter(point, 14);
// Create a marker
marker = new GMarker(point);
// Add the marker to map
map.addOverlay(marker);
// Add address information to marker
marker.openInfoWindowHtml(address);
GEvent.addListener(marker, "click", function() {
marker.openInfoWindowHtml(address);
});
}
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---