[OpenLayers-Users] WMS in various projections not EPSG:4326

Christopher Schmidt crschmidt at metacarta.com
Mon Oct 30 09:16:59 EST 2006


On Mon, Oct 30, 2006 at 07:54:50AM -0600, Lance Dyas wrote:
> I've probably missed something.. .is it possible to set a different 
> projection
> when making WMS layer requests through open layers... Many WMS
> respond faster when the image requests are in the "native" projections
> of the data... having the server reproject a UTM image into Geographic
> for every tile is one way of making a map slow.

To change the projection of the request, you need to change three
properties on the map level. An example of this is in freemap.html, in
the examples/ dir:

{
  maxExtent: new OpenLayers.Bounds(33861, 717605, 330846, 1019656), 
  maxResolution: 296985/1024,
  projection:"EPSG:2805" 
} 

To get an accurate scale, you should also change the 'units' parameter
to match the uits of your projection.

maxResolution is the number of units/pixel at the smallest scale
(farthest out). To fit the maxExtent into the window at the current
window size, you can use maxResolution: 'auto' instead. 

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Users mailing list