[OpenLayers-Users] Bounds

Alexandre Dube adube at mapgears.com
Mon Sep 21 10:42:22 EDT 2009


Hi,

This should helps :

http://trac.openlayers.org/wiki/FrequentlyAskedQuestions#Projections

Regards,

Alexandre

eoinyp wrote:
> Hi all,
> Could someone please explain how to define the bounds of a map?
>
> I want to centre my map on Ireland when it initialises, but I am having
> trouble with the bounds arguments.
> As I understand it, the maxExtent of the globe is (-180,-90,180,90) 
> A box around Ireland using the same coordinate system is (-13.5, 51.5, -4.5,
> 55.5)
> So shouldnt I be defining my map as: 
> maxExtent: new OpenLayers.Bounds(-13.5,51.5,-4.5,55.5 ) 
> ?
> This doesnt work, unsurprisingly.
> I found somewhere else the bounds of the world defined as:
> maxExtent: new OpenLayers.Bounds(-20037508, -20037508,20037508, 20037508.34)
> which works great, but it shows the entire globe, as I said, I want to focus
> on Ireland.
> What coordinate system is this? and how do I translate the area I want to
> map to this coordinate system?
>
> The variable maxResolution also seems to vary from map to map, I am not sure
> what this should be set to.
> The documentation doesnt give any idea of the range of appropriate values.
> Thanks,
>
> Eoinyp. 
>
>   


-- 
Alexandre Dubé
Mapgears
www.mapgears.com




More information about the Users mailing list