Hello Mike and Esa, Thank you for the advice. I will see what I can do.
Sincerely, Pawel On 18 Jun., 05:19, Mike Williams <[email protected]> wrote: > You can only use addDomListener on HTML Elements, like an <img> or a > <div>, not on API Objects like GMarkers. > > With GMarkers, it's difficult to find the actual DOM element of the > click target because the API doesn't expose the relevant information. > You can find it by crawling through the DOM, but remember that the click > target is different in different browsers and depends on whether the > GIcon has a .transparent or .imageMap. > > I think you need to look at a custom GOverlay that looks a bit like a > GMarker but exposes the click target. E.g. for ELabels you could write: > GEvent.addDomListener(label.div_, "click", function(e) { > GLog.write(e.ctrlKey); > }); > But if you put a marker-shaped image into an ELabel, the click target is > the whole rectangle, and the ELabel click target lies below the > infowindow shadow, so it's not clickable when shadowed. So you'd > probably need to look at some other custom GOverlay system that has > better click targets. > > -- > Mike Williamshttp://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 [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 -~----------~----~----~----~------~----~------~--~---
