[OpenLayers-Users] Set MaxExtend as SetCenter
Christopher Schmidt
crschmidt at metacarta.com
Fri Apr 13 10:05:30 EDT 2007
On Fri, Apr 13, 2007 at 01:53:10PM +0000, Francisco Domingues wrote:
>
> Hello all!
> I have more doubts :(
> I have a 'map.setCenter(new OpenLayers.LonLat(5,50),4);' and I want the
> MaxExtend of my map to the same extend. The thing is that went I select the
> zoomworld buttom the map gets extended till the borders of the data I have
> loaded. I have a predifined extend and want it to be the Maximum.
> Cheers!
Pass a 'maxExtent' parameter to the map:
Map('map', {maxExtent: new OpenLayers.Bounds(-180,-90,0,0)});
If this doesn't do it, please try to phrase your question more clearly.
Regards,
--
Christopher Schmidt
MetaCarta
More information about the Users
mailing list