// JavaScript Document

//<![CDATA[

   var geocoder;
   var map;

   var name = "L'&Icirc;le Noire Pub<br>342 rue Ontario Est <br>Montr&eacute;al (Qc) <br>H2X 1H8";
   var address = "342 rue Ontario Est, Montreal, QC, H2X 1H8 Canada";

   // On page load, call this function

   function load()
   {
      // Create new map object
      map = new GMap2(document.getElementById("map"));

      // Create new geocoding object
      geocoder = new GClientGeocoder();

      // Retrieve location information, pass it to addToMap()
      geocoder.getLocations(address, addToMap);
   }

   // 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]);
	  
	  map.addControl(new GSmallMapControl());
      
	  //this adds type of map control (ex. satellite)
	  //map.addControl(new GMapTypeControl());
	  
      // Center the map on this point
      map.setCenter(point, 15);

      // Create a marker
      marker = new GMarker(point);

      // Add the marker to map
      map.addOverlay(marker);

      // Add address information to marker
      marker.openInfoWindowHtml(name);
   }
//]]>