[OpenLayers-Users] distinguish "click" from "drag"
Christopher Schmidt
crschmidt at metacarta.com
Tue Apr 17 15:23:28 EDT 2007
On Tue, Apr 17, 2007 at 03:19:02PM -0400, Bobby Braswell wrote:
>
> Hi-
>
> I'd like to trigger certain events (e.g., display feature info) when
> the map is clicked, but not dragged. I'd like to do other things (or
> perhaps nothing special) when then map is dragged. Currently I am
> using map.events.register('click', map, function (e) {..}); and that
> works fine except for the undesirable behavior of showing feature
> info when the user simply wants to move the map around.
>
> Is there a way to register an event for click but somehow cancel it
> if there is a subsequent drag before the mouseup?
I'm assuming you're using IE. If so, it's possible that the patch to
http://trac.openlayers.org/ticket/656 , applied to trunk about 15
minutes ago, will solve your problem.
If you're not using IE, please explain -- preferably with a demo -- how
you are causing a click event to fire when dragging.
Regards,
--
Christopher Schmidt
MetaCarta
More information about the Users
mailing list