[OpenLayers-Users] Stopping DragPan moving map out side of the
viewport.
Dave Potts
dave.potts at pinan.co.uk
Sat Oct 22 15:12:38 EDT 2011
When using the DragPan Control its possible to move the map image
outside of the viewport.
When I set the MaxExtent of a map, to match the physical size of the
map, I assume the it would be impossible to drag the map image outside
of the viewport, but openlayers seem to be quite happy to allow this.
Is there any way of stopping it?
For example
http://dev.openlayers.org/releases/OpenLayers-2.11/examples/drag-feature.html
if you drag the map down untill you can see the north pole, it possible
to carry on dragging the map until you move off the end off the image,
when you see a white background. If would prefer to limit the map
movement until you hit the border of the map image.
Dave.
More information about the Users
mailing list