[OpenLayers-Users] Vectors on the move

Christopher Schmidt crschmidt at metacarta.com
Thu Apr 17 00:18:27 EDT 2008


On Thu, Apr 17, 2008 at 02:10:51PM +1000, bradleyspencer wrote:
> I am creating a selection box with a Shift-Mouse control and using this as a
> BBox criteria to do a getfeatureInfo request. That works just fine. I also
> draw the box on a vector layer and that is fine as well.
> 
> However, when you pan up and down the select box ‘floats’ relative to the
> base map. Has anyone seen this and if so is there a workaround?
> 
> If this is new I will make a little test app.

You're using a Handler.Box, I assume? How are you getting this to stay
on the map? every implementation I know of, it disappears when you let
go. 

In general, controls are stationary: if you want something to stick on
the map, you're going to need to draw it in some other way than as a
control, because it needs to be in the viewport div in order to move
with the map. The best way to do this is probably via a temporary vector
layer, since this will correctly handle things like map zooms, drags,
etc. 

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Users mailing list