[OpenLayers-Users] Bounds / Projection

eoinyp eoinyp at yahoo.com
Mon Sep 21 11:21:18 EDT 2009


Thank you Alexandre,
I now realise that the (-180,-90,180,90) system wont work because Im using
EPSG:900913, spherical mercator, which is where The projection
maxExtent: new OpenLayers.Bounds(-20037508, -20037508,20037508, 20037508.34)
comes in.
Thank you.
But Im still stuck as to how to set the map to focus on Ireland. I dont
understand how to define the bounds of a suitable box. Can you give me any
pointers there?
Thanks,

Eoinyp.





Alexandre Dube wrote:
> 
> 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
> 
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
> 
> 

-- 
View this message in context: http://n2.nabble.com/Bounds-tp3685720p3686056.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.



More information about the Users mailing list