Thats it!

substituting getMap() for getVisible() in the code gives me what I
want. The only anomaly  is that often as the map is moved (this is set
up as below so it fires when the map is changed ).....

                        google.maps.event.addListener(map, 'idle', function() {

console.clear();
                                for ( i=0;i<markers.length;i++ ) {
                                        if ( 
map.getBounds().contains(markers[i].getPosition()) ) {
console.log('marker');
                                                if ( markers[i].getMap() )
console.log(' - visible');
                                        }

                                }
                        });

......I get it reporting one extra marker - so if I can see within
bounds 7 individual and 1 cluster of two I will get a total marker
count of 10 markers. This is a small problem however now I know this
can be done, one that I can live with. Thanks very much for this
solution Rossko, really appreciate the help. Hope this code will be of
use to someone else too.

gdp



On Jul 12, 9:16 pm, Rossko <[email protected]> wrote:
> My mistake ; MarkerClusterer manages marker visibility by use of
> setMap()
> Try checking the getMap() value for null

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply via email to