I have made several improvements. It ought to work correctly
regardless of tile size.
I have added "click" / "cover" capabilities. Instead of individual
event listeners for every poly, you add a single event listener for
the entire PolyCluster.
For "mousedown" / "mouseup", use:
cluster.setClick(YourClickFunction);
It will be called with two arguments:
function YourClickFunction(polyname,flag)
The first argument is the name of the poly. The second argument will
be "true" for "mousedown" or "false" for "mouseup".
For "mouseover" / "mouseout", use:
cluster.setCover(YourCoverFunction);
It will be called with two arguments:
function YourCoverFunction(polyname,flag)
The first argument is the name of the poly. The second argument will
be "true" for "mouseover" or "false" for "mouseout".
http://www.polylib.us contains some demos.
--
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.