My understanding is that geoserver can reproject from any supported declared SRS to that of Virtual Earth/google/etc (EPSG:900913). Trouble is my WMS data stored in State Plane Coordinates (EPSG: 2231) do not line up with Virtual earth. See code below. Can anyone help me? I’m using openlayers as a client and have cross-posted the same question to that list. I’ve read nearly every document I can find on overlaying WMS on commercial data providers that use spherical Mercator but can’t get it to work.
In a WMS request, what does the ‘SRS’ option do? Does it simply declare the SRS of the requested layer(s) or does it actually ask geoserver to reproject the data?
var map;
function init() {
var bounds = new OpenLayers.Bounds
(-20037508.34, -20037508.34, 20037508.34, 20037508.34);
map = new OpenLayers.Map(‘map’,{projection: new OpenLayers.Projection(“EPSG:900913”), maxExtent: bounds}//,
/displayProjection: new OpenLayers.Projection(“EPSG:4326”)}/);
// pink tile avoidance
OpenLayers.IMAGE_RELOAD_ATTEMPTS = 5;
// make OL compute scale according to WMS spec
OpenLayers.DOTS_PER_INCH = 25.4 / 0.28;
velayer = new OpenLayers.Layer.VirtualEarth( “VE”,
{ ‘type’: VEMapStyle.Shaded, ‘spericalMercator’: true});
var wms = new OpenLayers.Layer.WMS(
“Joint Use Pictures”,
“http://upigis:8080/geoserver/wms”,
{layers: ‘sde:jointusepicture’, transparent: true}, {‘opacity’: 0.5, ‘isBaseLayer’: false, ‘wrapDateLine’: true, ‘displayOutsideMaxExtent’: true}
);
map.addLayers([velayer, wms]);
map.addControl(new OpenLayers.Control.LayerSwitcher());
map.zoomToMaxExtent();
}
David A. Hollema
GIS Analyst
United Power, Inc.