[OpenLayers-Users] Re: pan map while dragging feature?

Adam Eskreis aeskreis at gmail.com
Thu Feb 9 13:52:37 EST 2012

I have no idea if this is built into openlayers, but this seems like
something you could create with just some simple javascript.  Attach a
mouse move event to the document, and a boolean variable in the global
scope which tells you whether an item is currently being dragged (this can
be set up in an event handler for the vector feature).  Then in the move
event, if there is an item being dragged, grab the mouse position, and if
you are nearing the edge of the screen, have openlayers move the map.

On Thu, Feb 9, 2012 at 11:19 AM, j5c077 <jeremyswilson at att.net> wrote:

> i've tried setting the documentdrag to true however when dragging the
> feature
> it still stops once i reach the edge of the viewport
> --
> View this message in context:
> http://osgeo-org.1560.n6.nabble.com/pan-map-while-dragging-feature-tp4373005p4380024.html
> Sent from the OpenLayers Users mailing list archive at Nabble.com.
> _______________________________________________
> Users mailing list
> Users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20120209/e4ed5715/attachment.html

More information about the Users mailing list