[OpenLayers-Users] 4326 WMS overlay on top of google reproject,
WMS not showing up
Ed Fialkowski
edfialk at gmail.com
Thu Sep 18 13:57:07 EDT 2008
Hello all, I'm trying to display a North American borders WMS layer
(in EPSG:4326) on top of the google satellite layer here in
openlayers.
I got the google layer to reproject (thank you documentation), but I
can't seem to get the WMS overlay to do what I tell it.
Here's a linky: http://niceguy.wustl.edu/OPC/google.html
-notice "Borders" overlay turns a black line up and down center of
asia on and off.
Here's what that layer should look like:
http://niceguy.wustl.edu/OPC/borders.html
If I could just get that to show up on top of the google layer, I'd be thrilled.
Here's some pseudocode:
var options = {
projection: new OpenLayers.Projection("EPSG:900913"),
displayProjection: new OpenLayers.Projection("EPSG:4326"),
units: "m",
numZoomLevels: 18,
maxResolution: 156543.0339,
maxExtent: new OpenLayers.Bounds(-20037508, -20037508,
20037508, 20037508.34)
};
map = new OpenLayers.Map('map', options);
// create Google Mercator layers
var gmap = new OpenLayers.Layer.Google(
"Google Streets",
{'sphericalMercator': true}
);
// create WMS layer
var wmsurl =
"http://webapps.datafed.net/ogc_views_NEISGEI.wsfl?dataset_abbr_1=GSFC_NO2_OL&dataset_abbr_2=GSFC_NO2_OL¶m_abbr_1=CO¶m_abbr_2=CO&scale_min=0&scale_max=50&styles=bdr";
var wms = new OpenLayers.Layer.WMS.Untiled("Borders",
wmsurl, {layers: 'OpenLayers', format: "png"}, {'isBaseLayer':false,
'wrapDateLine':true});
Any questions, I'll try to respond ASAP. Thanks for any suggestions.
-Ed
More information about the Users
mailing list