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 the Maps API. 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 in GWT that 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 using maps for gwt. 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 the gwt map > case the marker does not disappear when it is clicked it remains > unchanged. > > The problem i have now: how do i tell a marker in gwt maps that 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 - 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 -~----------~----~----~----~------~----~------~--~---
