I was using this the GWT-openlayers in a project.
And i need to drag a marker (for instance an image of a restaurant to an 
personal GWT widget that receives droppable images).
Is it possible?

My workaround is a little ugly, because i detected the mouse over in the 
marker and then i created a GWT popup and only then i make the drag.
What i want is to detect an click and drag in the marker and start a GWT 
drag action.

Thanks for the help.

code workaround

mark = new Marker(lonlat, new Icon(url,new Size(iconWidth, iconHeight)));

mark .getEvents().register("mouseover", cam, new 
org.gwtopenmaps.openlayers.client.event.EventHandler() {

fp = new image(url);
fp.getElement().setDraggable(Element.DRAGGABLE_TRUE);
pp = new PopupPanel();
pp.add(fp);

                fp.addDragStartHandler(new DragStartHandler(){  
                    //addDomHandler(new DragStartHandler() {

                    @Override
                    public void onDragStart(DragStartEvent event) {
//do dragable action
}
}

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to