[OpenLayers-Users] Map Aspect Ratio Seems Off (Makes layers wide)

Andreas Hocevar ahocevar at opengeo.org
Sun Jun 21 14:14:50 EDT 2009


Hi,

On Fri, Jun 19, 2009 at 10:38 PM, soatley<shawn at niagarafalls.ca> wrote:
>
> I am having an issue with the aspect ratio of my map and my knowledge of
> projections is not that good, but my GIS co-workers are telling me that is
> probably the cause.  The attached image(
> http://n2.nabble.com/file/n3122010/example.jpg example.jpg ) shows what the
> map should look like (our existing mapping software) and how OL is
> displaying it.

Your co-workers are right. Maps in geographic coordinates (EPSG:4326)
look like that. The further you get away from the equator, the more
the map will be shrunk in latitudinal direction. This is not a bug,
but a matter of choosing the appropriate map projection.

> The GIS staff tell me that our data is projected in UTM 17N NAD83.

The EPSG code for this projection is probably EPSG:26917. See
http://spatialreference.org/ref/epsg/26917/

So the two things to change in your code is that you set the
projection to EPSG:26917 instead of EPSG:4326, set units to "m"
(meters), and provide the maxExtent in projected coordinates.

Regards,
Andreas.

> I hope I have provided enough information for someone to help me.
>
> Thanks!
> Shawn
> --
> View this message in context: http://n2.nabble.com/Map-Aspect-Ratio-Seems-Off-%28Makes-layers-wide%29-tp3122010p3122010.html
> Sent from the OpenLayers Users mailing list archive at Nabble.com.
>
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>



-- 
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.



More information about the Users mailing list