Hi Eric, thanks for the answer. Actually i have a clicklistener installed on the map. But i'm not shure if my code has the problem you described.
I made a small demo that compares the behaviour of the normal js map vs the gwt map. The demo is a ready eclipse project which just needs to be imported as an existing project and can be simply run. The demo can be downloaded as a zip file from here: http://qshare.com/get/856591/GoogleMapsExample.zip.html On 8 Jun., 13:44, Eric Ayers <[email protected]> wrote: > Hi Paul, > > I'm not exactly sure what is going wrong without seeing more code, but > I have a hunch. There is a tricky thing about click handlers in theMapsAPI. > Any click on an info window or marker is also forwarded to > the Map. This means that if you have a click handler installed on the > map and a marker, both fire when you click the marker. > > If this isn't causing your issue, could you please make a small test > case inGWTthat reproduces the problem and file an issue in the issue > tracker? > > On Mon, Jun 8, 2009 at 6:24 AM, Paul van > > > > > > Hoven<[email protected]> wrote: > > > I'm usingmapsforgwt. In my map the user can place a marker, and > > when he clicks another place on the map the marker is moved to this > > new place. But, if the user clicks on the marker itself the marker > > disappears. > > > I also implemented a map in plain html/javascript and in this senario > > the user can also place a marker on the map. But unlike in thegwtmap > > case the marker does not disappear when it is clicked it remains > > unchanged. > > > The problem i have now: how do i tell a marker ingwtmapsthat it > > should not disappear when it is clicked. My method for placing a > > marker looks like this > > > public void onClick( MapClickEvent event ) { > > MapWidget sender = event.getSender(); > > LatLng point = event.getLatLng(); > > > if( marker == null ) > > marker = new Marker(point); > > marker.setVisible(false); > > MarkerOptions mo = MarkerOptions.newInstance(); > > mo.setDraggable(true); > > mo.setClickable(false); //has no effect in regard to my > > problem > > marker = new Marker(point, mo); > > marker.setDraggingEnabled(true); > > sender.addOverlay( marker ); > > } > > > What am i doing wrong? > > -- > Eric Z. Ayers -GWTTeam - Atlanta, GA USAhttp://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 -~----------~----~----~----~------~----~------~--~---
