[OpenLayers-Users] display a border at the end of the world

Sergeant_york electronicpanda at gmail.com
Mon Mar 11 17:14:31 PDT 2013


If your problem is not being able to restrict people to draw outside of
defined borders, there is a much more easier solution by the way (inside of
drawing borders =) )

You can restrict OpenLayers.Map object's extent:

http://dev.openlayers.org/docs/files/OpenLayers/Map-js.html
restrictedExtent	{<OpenLayers.Bounds>|Array} If provided as an array, the
array should consist of four values (left, bottom, right, top).


Code can be like that:

map.setOptions({restrictedExtent: map.getMaxExtent()});






--
View this message in context: http://osgeo-org.1560.n6.nabble.com/display-a-border-at-the-end-of-the-world-tp5039296p5039794.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.


More information about the Users mailing list