Layers

Within the Capabilities section is a Layer element for each map that is provided by the service. WMS also allows layers to be made up of layers so some nesting of layers can also be seen in these elements.

Each Layer element includes the following:

  • Title – a name of the layer that is readable by the user.
  • Name – a name of the layer that is used to reference the layer in requests. If a layer has a title but no name that layer is used as a hierarchical heading for the layers below it.
  • Style – a predefined style that can be used with this particular layer.
  • SRS (1.1.1) or CRS (1.3.0) – the spatial reference system(s) that applies to this layer. If more than one can be used on the layer, each one can be listed.
  • LatLonBoundingBox (1.1.1) or EX_GeographicBoundingBox (1.3.0) – a set of attributes that state the minimum bounding rectangle of the map data in the default coordinate system. These numbers are expressed in decimal degrees.

These values are important when making a GetMap request, as that request requires the correct values that are specific to each individual Web Map service.

When layers are nested, the values set for a parent layer cascade down to subsidiary elements unless specifically set differently in the child layers. The example below shows portions of the Layer element to illustrate the different settings.



<Layer queryable="0" opaque="0" noSubsets="0" fixedWidth="0" fixedHeight="0">>
    <Title>Pitney Bowes Map Server</Title>
    <CRS>CRS:84</CRS>
    <CRS>EPSG:4326</CRS>
    <EX_GeographicBoundingBox>
        <westBoundLongitude>-180.0</westBoundLongitude>
        <eastBoundLongitude>180.0</eastBoundLongitude>
        <southBoundLatitude>-90.0</southBoundLatitude>
        <northBoundLatitude>90.0</northBoundLatitude>
    </EX_GeographicBoundingBox>
    <BoundingBox CRS="CRS:84" minx="-180.0" miny="-90.0" maxx="180.0" maxy="90.0"/>
    BoundingBox CRS="EPSG:4326" minx="-90.0" miny="-180.0" maxx="90.0" maxy="180.0"/>
    <Style>
        <Name>PointStylePin</Name>
        <Title>PointStylePin</Title>
        <Abstract>Pin point style.</Abstract>
    </Style>
    <Style>
        <Name>LineStyleSolid</Name>
        <Title>LineStyleSolid</Title>
        <Abstract>Solid line style.</Abstract>
    </Style>
<Layer queryable="1" opaque="0" noSubsets="0" fixedWidth="0" fixedHeight="0">
    <Name>World</Name>
    <Title>World Map</Title>
    <CRS>CRS:84</CRS>
    <CRS>EPSG:4326</CRS>
    <EX_GeographicBoundingBox>
        <westBoundLongitude>-180.0</westBoundLongitude>
        <eastBoundLongitude>180.0</eastBoundLongitude>
        <southBoundLatitude>-90.0</southBoundLatitude>
        <northBoundLatitude>90.0</northBoundLatitude>
    </EX_GeographicBoundingBox>
    <BoundingBox CRS="CRS:84" minx="-180.0" miny="-90.0" maxx="180.0" maxy="90.0"/>
    <BoundingBox CRS="EPSG:4326" minx="-90.0" miny="-180.0" maxx="90.0" maxy="180.0"/>
    <Style>
        <Name>AreaStyle</Name>
        <Title>AreaStyle</Title>
        <Abstract>Default area style</Abstract>
    </Style>
    <Style>
        <Name>AreaStyleBlue</Name>
        <Title>AreaStyleBlue</Title>
        <Abstract>Blue area style</Abstract>
    </Style>
    <Style>
        <Name>AreaStyleGreen</Name>
        <Title>AreaStyleGreen</Title>
        <Abstract>Green area style</Abstract>
    </Style>
     ...
</Layer>