Hi all.

Hoping someone can help me debug my map...

http://martinpearman.co.uk/searchwestnorfolk/map/map.php

The map uses my ClusterMarker to replace groups of markers whose icons
intersect with a single new (cluster) marker.

The clustering works perfectly when zooming and panning the map but i
have a problem with the sidebar clicks to open the infowindow of a
clustered marker.

Just about all sidebar clicks work perfectly.

The ClusterMarker triggerClick() method checks to see if a marker is
clustered or not.

Where a marker is clustered it starts at the map's current zoom level
plus one and checks to see if the (clustered) marker to be clicked
still remains clustered.
It repeats this until it finds the first zoom level at which the
marker to be clicked is no longer clustered or reaches the current map
type's maximum zoom level.

It then triggers a click on the desired marker which uses the GMap2
openInfoWindowHtml() method to open an infowindow.

Just about every sidebar click works perfectly but i've found some
which don't.

If you load my map and click sidebar 'Alexandra Dock' the map zooms to
level 13 and opens the infowindow leaving the marker clustered.
The terrain map type still has enough zoom levels available to
uncluster the marker - just zoom in one level and it'll uncluster.

Zoom back out one level and the marker clusters again, now click the
sidebar for 'Alexandra Dock' again and it works!

Click the GLargeMapControl 'Return to last result' button and try it
over again - it fails.

Another marker that exhibits the same behaviour is the 'Fisher Fleet'.

If you click the 'Return to last result' button again and try various
other sidebar clicks on clustered markers - that's green sidebar
entries - just about all of them work.
They zoom into the first zoom level that unclusters the marker and
open the infowindow.

The javascript can be found in the source of:
http://martinpearman.co.uk/searchwestnorfolk/map/map.php

And the ClusterMarker script at:
http://martinpearman.co.uk/searchwestnorfolk/map/common/ClusterMarker/unobfuscated/ClusterMarker.js

The ClusterMarker script contains the triggerClick() method where i'm
pretty sure the bug is, i thought maybe the bug was in the
_preCacheIconBounds() method but using GLog it seems that
_preCacheIconBounds() is correctly caching GLatLngBounds objects for
each marker's icon at each zoom level.

So why does triggerClick() set $markerIsClustered to true and exit
it's while loop at a zoom level where the marker is NOT
unclustered...?

Been working on this all morning and making little progress so would
be very pleased if someone could take the time to help :-)

Thanks.

Martin.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" 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-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to