When you are editing a text field, and you click outside that text field, a "blur" event fires on that text field element that you can do fun stuff with.
I'm building a Google map where you're editing a line, and I want to do some fun stuff when a user clicks outside the map. (i.e. deselect the current path, and start a new path when the map is clicked again)
Catching a click event on the page in general fee开发者_运维问答ls clumsy. Is there a google maps equivalent of the "blur" or "focusout" event?
You could try adding a dom listener to the map overlay for the blur event.
http://code.google.com/apis/maps/documentation/javascript/events.html#DomEvents
精彩评论