Ciao.
Nella mia mappa Google maps ho creato degli array per i markers.
Al click di un marker l'utente viene reindirizzato in un altra pagina.
Questo funziona, ma se ho più marker nella stessa categoria il link è sempre quello.
Dove ho sbagliato?

codice:
var allmakers = {};
    var bar = {
        "London": {
            "lat": 0,
            "lng": 0,
            "type": "town",
            "icon": "icon1.png",
            "url": "bar/",
            "visible": true
        } };
    var cafe = {    
        "Paris": {
            "title": "parigi",
            "lat": 10,
            "lng": 10,
            "type": "town",
            "icon": "icon2.png",
            "url": "cafe/",
            "visible": true
        },
        "tamigi": {
            "title": "tamigi",
            "lat": 15,
            "lng": 18,
            "type": "town",
            "icon": "icon2.png",
            "url": "cafe2/",
            "visible": true
        }
    };

 for (var marker in cafe) {
        var linkcafe = cafe[marker].url;
        allmakers[marker] = new google.maps.Marker({
            position: new google.maps.LatLng(cafe[marker].lat, cafe[marker].lng),
            map: map,
            //icon:markers[marker].icon,
            visible: cafe[marker].visible,
            });
            google.maps.event.addListener(allmakers[marker], 'click', function() {
            window.location.href = linkcafe;  
            }); 
            }