Here is what my interface looks like.
http://lh5.ggpht.com/Stanley.Travis/SL-djMRZRjI/AAAAAAAAA5A/OBBfJE2dJl4/s576/Picture%202.png

I will have a school and restaurant icon that can be clicked on where
the text is and the map area above will load with the local schools or
restuarants.


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
-~----------~----~----~----~------~----~------~--~---

Reply via email to