开发者

How to fire event when user clicks outside Google map

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜