[OpenLayers-Dev] Updating vector layers while dragging
Andreas Hocevar
ahocevar at opengeo.org
Thu Nov 19 14:25:28 EST 2009
Hey-
what you want would require a redesign of how vector layers are drawn.
Right now, only the visible area is drawn. So if you pan the map, you
will see nothing. To make this work in a different way, the vector layer
would need a ratio option like the grid layer, to support a larger
drawing pane. This change is not trivial, but doable.
Having said that, I agree that this would be nice to have, but would
require either funding or somebody willing to get their hands dirty.
Regards,
Andreas.
Phil Gyford wrote:
> Hi,
>
> I recently built a site that uses OpenLayers
> (http://www.e4.com/misfits/ - click the 'Play' button). At the moment
> the vector layers only update after the user has finished dragging or
> panning the "map" which, I realise from the FAQ, is by design.
>
> Even so, I'd like to experiment with having the layers redraw while
> the map is being moved, to avoid the clickable images being
> "invisible" until the move has completed. The images (the objects in
> the draggable photo with red marks around them) are Vector Points with
> externalGraphics applied in a StyleMap.
>
> I've spent some time trying to work out how to try this but I'm
> stumped. Can anyone give me a pointer? Maybe I need to add something
> to the move() function of OpenLayers.Handler.Drag? Or is it somewhere
> else? And, once I've found the correct event, how do I make the images
> re-draw?
>
> Many thanks,
> Phil
>
>
--
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.
More information about the Dev
mailing list