[OpenLayers-Users] Mercator... *think* I've got it!

Nick Whitelegg nick at hogweed.org
Wed Aug 23 09:03:33 CDT 2006


Through looking at various mailing list postings I think I've now got a handle 
on what I need to do if I want to use Mercator projections with OpenLayers 
for my Freemap renderer (http://nick.dev.openstreetmap.org/osm.php). It looks 
rather too squashed at my latitude (51N) if I don't use a projection.

It seems the bounding box needs to be specified in metres (from the equator 
and the Greenwich meridian, I take it), rather than latitude and longitude - 
is this correct?

However in my (JavaScript) code I will want to use degrees of latitude and 
longitude rather than metres, e.g. so I can use a geocoder to get a lat/lon 
of a place, and centre the map at that lat/lon. Can I do that with OpenLayers 
as it stands, i.e can I tell OpenLayers that my bbox requests are in metres 
so that it converts appropriately?

Thanks,
Nick


More information about the Users mailing list