Finally I wrote my first page using Google Map API for my city: Rome (Italy). I don't know when Google adds support for italian cities map but now you can use it.
I've added Google Map for our "Aula Informatica Roma" project, the training centers where we offer instructor-led courses and training.
It was simple as the beer :
function load() {
if (GBrowserIsCompatible()) {
var map = new GMap2(document.getElementById("map"));
map.addControl(new GLargeMapControl());
var point = new GLatLng(41.91837340014303, 12.52018690109253);
map.setCenter(point, 16);
var marker = new GMarker(point);
map.addOverlay(marker);
GEvent.addListener(marker, "click", function() {
marker.openInfoWindowHtml("<b>Aula roma informatizzata</b><br>Via Famiano Nardini 1/c<br>A 5 minuti dalla Metropolitana B<br> di Piazza Bologna.");
});
GEvent.addListener(map, 'click',
function(overlay, point) {
if (point) {
document.getElementById('click_lat').value = point.y;
document.getElementById('click_long').value = point.x;
}
}
)
}
}






















Comments