[OpenLayers-Users] Re: Combining layers with different SRS - intentionally - is failing

Andreas Hocevar ahocevar at opengeo.org
Fri Mar 2 12:40:38 EST 2012


Hi,

yes, you will need a more recent version then 2.11. This feature was
introduced with
https://github.com/openlayers/openlayers/commit/b9517a4cb5a6a21bcf440d3613ce19331fe9b55d.

As long as your tweaks to EPSG:3857 don't cause the projection to
change, this should still work.

If your EPSG code is different than 3857 (you mentioned 3875 and
3785), you have to add  something like

OpenLayers.Projection.addTransform("EPSG:3785", "EPSG:900913",
OpenLayers.Projection.nullTransform);
OpenLayers.Projection.addTransform("EPSG:900913", "EPSG:3785",
OpenLayers.Projection.nullTransform);

before creating your map to make sure OpenLayers knows 3785 as another
web mercator alias.

Andreas.

On Fri, Mar 2, 2012 at 6:24 PM, cheesybiscuits
<thomaschristian at gmail.com> wrote:
> Thanks Andreas I will give this a try when I next have access to the data,
> although this does look very similar to my existing code. When you say 'a
> recent build' do you mean more recent than 2.11 Release?
>
> It's good that OpenLayers will treat 900913 and 3875 as the same SRS, but
> much to my ongoing irritation I have to use a tweaked version of 3785, so
> OpenLayers cannot help me in the same way.
>
> --
> View this message in context: http://osgeo-org.1560.n6.nabble.com/Combining-layers-with-different-SRS-intentionally-is-failing-tp4537869p4539965.html
> Sent from the OpenLayers Users mailing list archive at Nabble.com.
> _______________________________________________
> Users mailing list
> Users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-users



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


More information about the Users mailing list