I am using jQuery UI's Draggable plugin to allow the user to drag an image from a box onto a google map to set a marker... the image they were dragging then snaps back to the box it was originally inside of.

I'm running the code that updates the map using the draggable's 'dragend' event, but that callback doesn't seem to fire until the draggable has finished reverting to its original position. I've set the revertDuration to 0, 1, and other small numbers, but there seems to be a minimum duration for its animation. Is there a way to remove the animation entirely? The reason it matters is because the marker is set using the latlong the mouse is hovering over at the time of the callback, but the user can't be expected to hold their cursor exactly still for the fraction of a second it takes for the draggable to revert.

Also if there's an easier way to do all of this, I'm all ears... I glanced through the google map API and didn't see any way of dragging something from outside the map into/onto the map.

Reply via email to