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?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to