Hi Joanne, I use it with a different projection than EPSG:4326, but I have my map constructed beforehand and merge the context layers back into an existing map object. Also because it is hard for OL to guess what set of resolutions is a good match for your projection.
If I load the first document you sent, the units on the map (map.units) are still degrees, but I assume EPSG:42304 is meters or not? Install Firebug, and see what WMS requests OL is sending, for instance now I am getting a BBOX which won't result in anything ofcourse. &BBOX=339480,1962400,339840,1962760 or 339840,1962040,340200,1962400 My first guess would be the units. Otherwise check the set of resolutions/scales. Best regards, Bart McGraw, Joanne wrote: > Hello everyone, > > I have been trying to load a context document through the OpenLayers > wmc.html example for a couple of days now to no avail. I am using > OpenLayers 2.6 and MapServer 5.0.2. > > The context document I would like to display is included below (the > first one); note the BoundingBox and Layer SRS and Extents, including > the layer's ol:maxExtent and ol:units. That first context document does > not display anything in the map in the wmc.html page but there is no > suggestion that a problem occurred anywhere along the way. The browser > "waits" for atlas.gc.ca and is eventually "Done", but no data displays. > > The second context document below does display the layer defined in the > wmc.html map. The only things different between the two context > documents are related to the SRS and extents. In the second context > document, I use lat/long values and don't bother trying to set the > ol:maxExtents and ol:units specifically. I just leave them at the > defaults. > > When I look at the results of the GetCapabilities request to the > atlaswms_en service, the definition for the "can_1m_bound" layer > suggests I should be able to get the map using the EPSG:42304 > projection. For verification, the GetCapabilities xml can be obtained > with: > http://atlas.gc.ca/cgi-bin/atlaswms_en?service=WMS&version=1.1.1&request > =getCapabilities > > Are context documents using projections and extents that are not > lat/long supported? I can't find any documentation suggesting that this > is the case and that there is a problem with what I am trying to do. > Assuming other SRS besides EPSG:4326 are supported, can anyone suggest > where I am going wrong below? > > Cheers, > jtm > > ------------------------------------------------------------------------ > -------- > > <ViewContext xmlns="http://www.opengis.net/context" version="1.1.0" > id="atlas_en" xsi:schemaLocation="http://www.opengis.net/context > http://schemas.opengis.net/context/1.1.0/context.xsd" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> > <General> > <Window width="512" height="256"/> > <BoundingBox SRS="EPSG:42304" minx="-2700000" miny="-725000" > maxx="3380000" maxy="4650000"/> > <Title>NLWIS Map</Title> > <Extension> > <ol:maxExtent xmlns:ol="http://openlayers.org/context" > minx="-2750000" miny="-900000" maxx="3250000" maxy="3900000"/> > </Extension> > </General> > <LayerList> > <Layer queryable="1" hidden="0"> > <Server service="OGC:WMS" version="1.1.1" title="National > Atlas WMS"> > <OnlineResource xlink:type="simple" > xmlns:xlink="http://www.w3.org/1999/xlink" > xlink:href="http://atlas.gc.ca/cgi-bin/atlaswms_en?"/> > </Server> > <Name>can_1m_bound</Name> > <Title>Boundaries (1:1 000 000)</Title> > <SRS>EPSG:42304</SRS> > <Extension> > <ol:maxExtent xmlns:ol="http://openlayers.org/context" > minx="-2700000" miny="-725000" maxx="3380000" maxy="4650000"/> > <ol:units > xmlns:ol="http://openlayers.org/context">meters</ol:units> > </Extension> > </Layer> > </LayerList> > </ViewContext> > > ------------------------------------------------------------------------ > -------- > > <ViewContext xmlns="http://www.opengis.net/context" version="1.1.0" > id="atlas_en" xsi:schemaLocation="http://www.opengis.net/context > http://schemas.opengis.net/context/1.1.0/context.xsd" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> > <General> > <Window width="512" height="256"/> > <BoundingBox SRS="EPSG:4326" minx="-142" miny="40.5" maxx="-51.5" > maxy="84.5"/> > <Title>NLWIS Map</Title> > <Extension> > <ol:maxExtent xmlns:ol="http://openlayers.org/context" > minx="-2750000" miny="-900000" maxx="3250000" maxy="3900000"/> > </Extension> > </General> > <LayerList> > <Layer queryable="1" hidden="0"> > <Server service="OGC:WMS" version="1.1.1" title="National > Atlas WMS"> > <OnlineResource xlink:type="simple" > xmlns:xlink="http://www.w3.org/1999/xlink" > xlink:href="http://atlas.gc.ca/cgi-bin/atlaswms_en?"/> > </Server> > <Name>can_1m_bound</Name> > <Title>Boundaries (1:1 000 000)</Title> > <SRS>EPSG:4326</SRS> > <Extension> > <ol:maxExtent xmlns:ol="http://openlayers.org/context" > minx="-142" miny="40.5" maxx="-51.5" maxy="84.5"/> > </Extension> > </Layer> > </LayerList> > </ViewContext> > > ------------------------------------------------------------------------ > -------- > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > > -- Bart van den Eijnden OSGIS, Open Source GIS [EMAIL PROTECTED] http://www.osgis.nl _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users