views:

20

answers:

1

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.

http://img121.imageshack.us/img121/9022/overlayph.png

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