How to make a text selection in my overlays? Now my overlays inactive for text selection and creates a zoom when i double-click in overlay.
A:
You need to cancel the propagation of events on the overlay so they do not bubble up to the map. The most commmon events would be click, mousedown, mouseup, mousemove, mouseenter, mouseleave but it just depends what you want to do.
So add an event listener to your base div that contains the overlay and add:
google.maps.events.addDomListener(theDiv, theEvent, function(e) {
e.cancelBubble = true;
if (e.stopPropagation) {
e.stopPropagation();
}
});
skarE
2010-08-20 02:37:22