[OpenLayers-Users] Support for custom projections

Richard Vong rvong at digitalglobe.com
Fri Apr 13 22:33:43 EDT 2007


Hi,

I was wondering if anyone has encountered the need for OpenLayers to 
support custom projections. As of the upcoming version 2.4, the way how 
a point in pixels gets translated to degree coordinate has been through 
simple scaling as defined by the OpenLayers.Layer's properties such as 
scale, units, min/maxResolution, etc. This works well for geographical 
Lat/Lon projection, but not for other projections with more complicated 
transformations such as Mercator-Ellipsoid or Cylindrical-Equidistant.
I have studied the implementation for the plugin Google-Map's Layer, in 
which the author implements a FixedZoomLevels Layer as a work around to 
allow more complicated projections; since Google uses Mercator-Spheroid 
projection. I have found the need to work with Mercator-Ellipsoid 
projection and have implemented my own layer in similar way ,however, 
this workaround does not work if well when we want to draw vector 
polygons (using the Vector Layer) as the points don't get projected 
correctly and appear misaligned. A way to fix this will be implement 
another Vector Layer that will know how to reproject the polygons in the 
correct way. This is just a lot of rework and defeats the purpose of 
reusing what OpenLayers already provides.
I plan to propose an extension to OpenLayers; may be like a feature 
request; to implement a projection class that replaces the current 
approach to translating pixels to geo-lonlat with the goal of allowing 
more complicated projections. But before I do that, I want to know if 
anyone has interest for such a need.

Thanks,

Richard



More information about the Users mailing list