[OpenLayers-Users] show two layers with different projections

GeoGEOrge awmlamp at yahoo.com
Thu Mar 11 13:20:35 EST 2010



I am trying to use openlayers to display a raster with projection EPSG:4326
and a vector layer with projection EPSG:2249. 
I am able to display each separately, but I cannot get the vectors to show
on top of the raster. 
both are WMS layers served by GeoServer 2.0.0

            var options = {
                projection: new OpenLayers.Projection("EPSG:2249"),
                displayProjection: new OpenLayers.Projection("EPSG:2249"),
                 format: "image/png",
                maxExtent: new OpenLayers.Bounds(879100, 2809300, 879700,
2809800)
            };
            map = new OpenLayers.Map('map', options);


  var orthoA = new OpenLayers.Layer.WMS( "orthoA", 
		http://72.70.16.144:8090/geoserver/wms",
		{layers: 'topp:Plymouth_RGB_A', VERSION: "1.1.1"},
		{isBaseLayer: true, units: "dd",
		projection: new OpenLayers.Projection("EPSG:4326")
		 // maxResolution: 1
		} );
 
  var CemGrave = new OpenLayers.Layer.WMS( "CemGrave", 
		http://72.70.16.144:8090/geoserver/wms",
		{layers: 'plymouth:CemGrave', VERSION: "1.1.1"},
		{opacity: 0.3, visibility: true,
		projection: new	OpenLayers.Projection("EPSG:2249"),
		isBaseLayer: false, transparent: true, units: "feet"
		} );

-- 
View this message in context: http://n2.nabble.com/show-two-layers-with-different-projections-tp4717734p4717734.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.



More information about the Users mailing list