[OpenLayers-Users] 4326 WMS overlay on top of google reproject, WMS not showing up

Ed Fialkowski edfialk at gmail.com
Wed Oct 1 13:18:09 EDT 2008


Is it possible to have two different units for two layers on the same map?

the bounding box for my WMS request is a bit...off.  I'm guessing the
request is using meters, since that's in the map options.

Here's the current request:
http://webapps.datafed.net/ogc_views_NEISGEI.wsfl?dataset_abbr_1=GSFC_NO2_OL&dataset_abbr_2=GSFC_NO2_OL&param_abbr_1=CO&param_abbr_2=CO&scale_min=0&scale_max=50&styles=bdr&SRS=EPSG%3A4326&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&LAYERS=OpenLayers&FORMAT=image%2Fpng&TRANSPARENT=true&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&BBOX=-12523442.3728,2504688.8815999986,-10018753.8304,5009377.423999999&WIDTH=256&HEIGHT=256

big ol' bounding box.
Here's the same request with a more lon/lat bounding box:
http://webapps.datafed.net/ogc_views_NEISGEI.wsfl?dataset_abbr_1=GSFC_NO2_OL&dataset_abbr_2=GSFC_NO2_OL&param_abbr_1=CO&param_abbr_2=CO&scale_min=0&scale_max=50&styles=bdr&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&LAYERS=OpenLayers&FORMAT=image%2Fpng&TRANSPARENT=true&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&BBOX=-180,20,-40,90&WIDTH=256&HEIGHT=256&SRS=EPSG:4326

            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);

it would be amazing if I could assign these options to one layer, and
a different set of options to another layer, or at least tell this one
layer to just use degrees for units.

Does anyone know if this is possible?
Thanks for any help.
-Ed



More information about the Users mailing list