Wasn't it Mike Williams who wrote:
>
>Wasn't it feanor who wrote:
>>Also is it too difficult to write a custom mouseover event for
>>gpolygon, which can send the point argument?
>
>That wouldn't help. Mouseover events only trigger when the mouse moves
>from outside to inside, so your tooltip ends up at the border again.
>You'd need a poly:mousemove event.
>
>
>Another strategy would be to use mouseover and mouseout to inform you
>about which polygon the mouse is over and use
>   GEvent.addDomListener(map.getContainer(),"mousemove", function(e)
>to inform you about where the mouse cursor is.
>
>The advantage is that that event is still available even when the mouse
>is over a clickable poly.
>
>The big disadvantage is that the API doesn't decode the parameter for
>you. You get the browser-specific MouseEvent object.
>
>In Firefox the code might look something like this:
>   http://econym.org.uk/temp/domlistener.htm
>except that I don't handle the position of the map on the page, and just
>assume that the map is in the top left corner. Plus there'd need to be
>code to detect which browser is being used and decode the MouseEvent
>object appropriately for that browser.
>

Furether research seems to suggest that e.clientX and e.clientY might 
work in all browsers, so all you have to do is subtract the position of 
the map container.

-- 
Mike Williams
http://econym.org.uk/gmap



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" group.
To post to this group, send email to Google-Maps-API@googlegroups.com
To unsubscribe from this group, send email to 
google-maps-api+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to