
function Autovelox() {
    
    this.regione    = "";
    this.comune     = "";
    this.strada     = "";
    this.direzione  = "";
    this.limite     = "";
    this.chilometro = "";
    this.lng        = "";
    this.lat        = "";
}

function addMarker(autovelox) {
    var point  = new GLatLng(autovelox.lat, autovelox.lng);
    var marker = new GMarker(point);
    
    var html = "<table>";
        html+= "<tr><td>"+autovelox.comune+"</td><td>"+autovelox.regione+"</td></tr>";
        html+= "<tr><td colspan=\"2\">"+autovelox.strada+"</td></tr>";
        html+= "<tr><td colspan=\"2\">Chilometro "+autovelox.chilometro+"</td></tr>";
        html+= "<tr><td colspan=\"2\">Limite "+autovelox.limite+" km/h</td></tr>";
        html+= "</table>";
                    
    GEvent.addListener(marker, 'click', function() {
        marker.openInfoWindowHtml(html);
    });
   // marker.openInfoWindowHtml(html);
    map.addOverlay(marker);
    bounds.extend(point);
    map.setCenter(bounds.getCenter(), map.getBoundsZoomLevel(bounds));
}

