Yes, I tried and this not work, the problem is when I put another extent the 
javascript returns this error:

this.center is null

These are the map options:

My extents extracted from spatialreference.org:

// This is Europe extent
var extent_europa = new OpenLayers.Bounds(-859177,3907327,3324210,6977350);
// This is Spain Extent
var extent_espanya =  new OpenLayers.Bounds(93568.0098, 169918.9449, 
1227661.0463, 1043747.4891);

And my map options:

 var options = {
                        units: 'm',
                        restrictedExtent: extent, 
                        controls: [], 
                        resolutions: 
[4085.33886725,2042.669433625,1021.3347168125,255.333679203125,127.6668396015625,15.958354950195313,7.979177475097656,3.989588737548828,0.997397184387207],
                        div:OpenLayers.Util.getElement('mapa')
                };

If I put Spain extents javascript give me an error.

I suppose I have to convert bound or something like that.

Thanks another time.


> Date: Thu, 25 Mar 2010 19:23:15 +1100
> Subject: Re: [OpenLayers-Users] Restrict navigation
> From: [email protected]
> To: [email protected]
> CC: [email protected]
> 
> i think restrict extent is what your after
> 
> http://www.openlayers.org/dev/examples/restricted-extent.html
> 
> On 25 March 2010 19:21, Jordi Romagos i Figueras
> <[email protected]> wrote:
> > Hi,
> >
> > Is possible to restrict to certain users the navigation to a one part of the
> > map. For example, one users only France, another one only Spain, etc.
> >
> > Thanks a lot.
> >
> > ________________________________
> > Actualízate gratis al nuevo Internet Explorer 8 y navega más seguro
> > _______________________________________________
> > Users mailing list
> > [email protected]
> > http://openlayers.org/mailman/listinfo/users
> >
> >
> 
> 
> 
> -- 
> Zac Spitzer
> Solution Architect / Director
> Ennoble Consultancy Australia
> http://www.ennoble.com.au
> http://zacster.blogspot.com
> +61 405 847 168
                                          
_________________________________________________________________
¿Quieres saber qué PC eres? ¡Descúbrelo aquí!
http://www.quepceres.com/
_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users

Reply via email to