﻿var map;
function load() {
    map = new GMap2(document.getElementById("map"));
    map.addControl(new GLargeMapControl());
    map.addControl(new GMapTypeControl());	        
    var address = 'Via Baccanazza 5, 37052,Casaleone,Verona,Italia';
    //var address = '821 Mohawk Street, Columbus OH';
    geocoder = new GClientGeocoder();
    geocoder.getLocations(address, addToMap);
}
    
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, 9);
  // Create a marker
  marker = new GMarker(point);
  // Add the marker to map
  map.addOverlay(marker);
  // Add address information to marker
  //marker.openInfoWindowHtml(place.ThoroughfareName);
}
