The MapOnClick handler gets fired for every click even double clicks or clicks on other entities: Here's a related post:
http://groups.google.com/group/gwt-google-apis/browse_thread/thread/4ecf7b1def50a0b3/c7761dec3e1ea2f0?lnk=gst&q=onclick#c7761dec3e1ea2f0 On Mon, May 4, 2009 at 11:13 AM, Janek <[email protected]> wrote: > > Hey, > I have such situation: > to the map widget I'm adding a MapClickHandler which implements > onClick. In the onClick I create a marker which I add to the map and > after that I also create a InfoWindowContent, as follows: > final Marker marker = new Marker(point); > InfoWindow info = sender.getInfoWindow(); > sender.addOverlay(marker); > InfoWindowContent iwc = > InfoWindowFactory.displayAddSpotWindow(marker, markers); > info.open(marker, iwc); > The problem is that when I click somewhere else on the map (not on the > info window) a new marker with info window is created. I tried to use: > iwc.setNoCloseOnClick(true); > but for some reason it doesn't work... probably because of the fact > that this all code is in onClick which is independent from iwc > instance that I created. But do you know any way how to achieve it? > Cheers, > Jan. > > > -- Eric Z. Ayers - GWT Team - Atlanta, GA USA http://code.google.com/webtoolkit/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" 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-Web-Toolkit?hl=en -~----------~----~----~----~------~----~------~--~---
