>       GEvent.addListener(marker, "mouseover", function(e) {
>               marker.setImage("/assets/images/pin_OverState.png");
>
>               alert(e.pageX);

Be aware that API events are very different from browser-specific
Events.

In the case of a marker "mouseover" event, the API passes you a GLatLng
representing the position of the marker. GLatLng objects don't have a
.pageX property.

You may be being confused by
   GEvent.addDomListener(HtmlElement, "mouseover" function(e)
which does pass a browser-specific Event object to your callback
function, but you can only use addDomListener with HtmlElements [1]. In
the case of a marker, you'd have to attach it to the click target of the
marker if you provided an icon.imageMap, or to the marker <img> element
if you didn't. That's not going to be easy because the API doesn't
expose those Elements - you'd have to crawl through the DOM searching
for the HtmlElements that are used by your GMarker.

[1] That's actually not quite true, but the exceptions aren't helpful
here and will just confuse you more.

-- 
http://econym.org.uk/gmap
The Blackpool Community Church Javascript Team


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