On Jun 17, 6:39 pm, kilkul <[email protected]> wrote:
> I've noticed that polygons click events trigger the map click event,
> also. As there doesn't seem to be any way of determining, on map's
> click event, if the target was (or not) an overlay... how can I fix
> this?
>

an indirect method is to check the cursor style: if it's a pointer
then it's an overlay.  However this method won't work on phones
because they don't have cursors.

I tried it with a mousedown listener on the map_canvas to record the
cursor style.  Then it's used in the map click listener to check if
the click was on an overlay.

see the following examples:

Polygon
http://www.william-map.com/20100618/1/polygon.htm

KML
http://www.william-map.com/20100618/1/kml.htm

-- 
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