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

cheesybiscuits thomaschristian at gmail.com
Tue Mar 6 15:23:19 EST 2012


Hi Andreas,

Many thanks for your input, I now have achieved what I wanted to do.

The required functionality is available within 2.11 Release. This is the
magic:

var liveLayer = new OpenLayers.Layer.WMS(
  "some_name",
  "http://host_name:8080/geoserver/test/wms",
  {
    LAYERS: 'layer_name',
    STYLES: '',
    format: "image/png",
    transparent: true
  },
  {
    singleTile: true,
    ratio: 1,
    isBaseLayer: false
  } 
);

liveLayer.projection = new OpenLayers.Projection('EPSG:3785');
OpenLayers.Projection.addTransform("EPSG:3785", "EPSG:900913",
OpenLayers.Projection.nullTransform);

map.addLayer(liveLayer);


Thanks again!

--
View this message in context: http://osgeo-org.1560.n6.nabble.com/Combining-layers-with-different-SRS-intentionally-is-failing-tp4537869p4552432.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.


More information about the Users mailing list