I'm trying a googlemaps implementation like that http://koti.mbnet.fi/ojalesa/boundsb...ebar_plain.htm . (this code is not ok for me because my markers are initializate diferent:

Code:
poiTable: function(){
    var geocoder = new google.maps.Geocoder();
    var address;
    googleMaps.pointsArray=[];
    googleMaps.clusterStyles=[];
    var map = googleMaps.map;
    googleMaps.getWS(
        "llista_POIs",
        function(data){ 
            $.each(data.llistaPOI, function(index,value){
            address= value["POI_postal"] + "," + value["POI_ciutat"];
                geocoder.geocode( { 'address': address}, function(results, status) {
                $("#llistaPOI").append('<li><div class="POIElement" id="POI'+value["id"]+'"><span>'+value["POI_name"]+'</span></div></li>');    
                if (index < data.llistaPOI.length -1) {
                    if (status == google.maps.GeocoderStatus.OK) {
                        googleMaps.map.setCenter(results[0].geometry.location);
                        var markerId = "marker" + Math.floor(Math.random()*1000000);
                        $('.map_container').gmap('addMarker', 
                            {
                                'position': results[0].geometry.location.lat()+','+results[0].geometry.location.lng(), 
                                'bounds': true, 
                                'icon': new google.maps.MarkerImage('http://images.com/green_marker.png',    
                                    new google.maps.Size(29,40), 
                                    new google.maps.Point(0,0), 
                                    new google.maps.Point(0,40)
                                )
                            },
                            function(map, marker){
                                googleMaps.map=map;
                                    $(marker).click(function(){
                                        var bubble = new InfoBubble({ 
                                          content: "<span>"+value['POI_name']+"</span><p>", 
                                          map:googleMaps.map,
                                          shadowStyle: 1, 
                                          padding: 0, 
                                          backgroundColor: 'rgb(255,255,255)', 
                                          arrowSize: 10, 
                                          borderWidth: 1,  
                                          borderColor: 'lightgray', 
                                          disableAutoPan: false, 
                                          hideCloseButton: false, 
                                          arrowPosition: 50, 
                                          backgroundClassName: '', 
                                          arrowStyle: 0 
                                        });
                                        bubble.open(map, marker);
                                    }); 

                            }
                        );  
                        googleMaps.clusterStyles.push({
                            opt_textColor: 'transparent',
                            textColor: '#000000',
                            url: 'http://images.com/green_cluster.png',
                            height: 35,
                            width: 35
                        });
                    }
                     else {
                         alert("Geocode was not successful for the following reason: " + status);
                     }
            }
            else{
                    googleMaps.clusteringMarkers($('.map_container').gmap('get', 'markers'));
                    googleMaps.poiWindow();
                }
            });
        });
    });


},
I need have access to markers events (like click) from external elements, but I don't have DOM element. I've been try to set an random id to each marker but doesn't run. Can someone help me please?