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