[OpenLayers-Users] SphericalMercator and SRS aliases
epsg:900913, epsg:3857, epsg:3785, epsg:102113
Anne Blankert
anne.blankert at geodan.nl
Mon Jul 19 08:51:39 EDT 2010
Hello Bart,
My 2 cents:
In my opinion it is quite difficult for users to discover:
- OpenStreetMap, Google, Bing, Yahoo etc. use a projection called
'SphericalMercator'
- 'SphericalMercator' in OpenLayers uses code 'epsg:900913'
- there exist multiple aliases for 'epsg:900913' and some services
prefer alias epsg:3857 or epsg:102113 over epsg:900913
- how to override the default openlayers sphericalmercator epsg code
with an other epsg code
- discover that the override produces side effects in measurement and
mouseposition (and other functions, such as click-events...?)
- how to solve the side effects, by adding code:
OpenLayers.Projection.addTransform("EPSG:4326", "EPSG:3857",
OpenLayers.Layer.SphericalMercator.projectForward);
OpenLayers.Projection.addTransform("EPSG:3857", "EPSG:4326",
OpenLayers.Layer.SphericalMercator.projectInverse);
But instead of solving this in the library, this can also be part of the
documentation. Maybe that documentation already exists and I've
overlooked it?
Cheers,
Anne
On 7/19/2010 1:15 PM, Bart van den Eijnden (OSGIS) wrote:
> Hi Anne,
>
> check the example (first couple of lines in comments):
>
> http://trac.openlayers.org/browser/trunk/openlayers/examples/web-mercator.js?rev=10384
>
> So that's up to the application to provide (at least for now). But I can
> also see that's not really easy for end-users.
>
> What do other people think about providing the EPSG aliases by default in
> the OL library?
More information about the Users
mailing list