HowTo: add a new layer to a mapService
1. Introduction
This HowTo page describes how to use the deegree 3 services console to add a new layer to a deegree 3 mapService. The description is based on the deegree3 utahDemo ready for download.
The mapService configuration file contains a list of all layers served by the WMS. What you will earn in this tutorial is how to add a new layer definition to the mapService. Each layer of a WMS is based on a data source. In this example we will demonstrate how to add a new layer to a mapService which is based on a shape feature store.
Services console login: "deegree" (without the quote signs) is the default password.
2. Preparations
For this tutorial we will use the same shape file (landslide areas) as in the tutorials on
If you have not worked through either one of these tutorials yet, you should please do so now.
3. Add Layer
Click on the link web services.
In the list of available web services, click on Edit for the wms.
- You are now able to edit the text of the configuration xml file:
Scroll down to the <RequestableLayer> for DominantVegetation.
- Copy the following snippet (it contains the mandatory elements needed for a layer definition):
<RequestableLayer> <Name>LandslideAreas</Name> <Title>Lanslide Areas in the County of Utah</Title> <FeatureStoreId>utah_landslides</FeatureStoreId> </RequestableLayer>
and add it into the configuration, just below the DominantVegetation:
To apply the changes, you need to click the Save button at the top of the editor. The editor window will close and the Reload link in the top left corner will turn red to inform you about changes that have not been forwarded to the server side yet.
Click the Reload button to permanently store the changes in your configuration. (Follow-up message: Applying changes. Please wait).
What you have achieved now is a layer definition for a requestable layer in the mapService which uses the feature store with the ID utah_landslides. This feature store had been created in the last tutorial based on a shape file.
4. Check success
- Check the capabilities of your WMS:
Click on the Capabilities button next to the wms.
The <WMS_Capabilities> document will contain the following section:
<Layer queryable="1"> <Name>LandslideAreas</Name> <Title>Lanslide Areas in the County of Utah</Title> <CRS>EPSG:4326</CRS> <CRS>CRS:84</CRS> <CRS>EPSG:26912</CRS> <EX_GeographicBoundingBox> <westBoundLongitude>-111.73049698852043</westBoundLongitude> <eastBoundLongitude>-111.49931524873621</eastBoundLongitude> <southBoundLatitude>40.12792563087405</southBoundLatitude> <northBoundLatitude>40.5005578203845</northBoundLatitude> </EX_GeographicBoundingBox> <BoundingBox CRS="EPSG:4326" minx="-111.73049698852043" miny="40.12792563087405" maxx="-111.49931524873621" maxy="40.5005578203845"></BoundingBox> <BoundingBox CRS="CRS:84" minx="-111.73049698852043" miny="40.12792563087405" maxx="-111.49931524873621" maxy="40.5005578203845"></BoundingBox> <BoundingBox CRS="EPSG:26912" minx="438101.29999999737" miny="4442208.799999999" maxx="457458.9000000001" maxy="4483437.7"></BoundingBox> </Layer>
- View the layer in the map:
Go to the integrated OpenLayers client by clicking on see layers and activate the layer LandslideAreas in the layer list on the rigt hand side.
5. What next ?
The layer is already in the map, but now we want colour! The logical follow-up will be handled in another tutorial and teach you how to add styling to a layer. Another interesting tutorial might be how to change styling of a layer.
6. Further reading
For details on layers and mapService configuration, please refer to teh mapService configuration. Some background knowledge on general services configuration might also be of interest.
Other pages focusing on the deegree 3 services console:
Detailed description of the deegree 3 workspace and associated configuration pages:
- deegree3/WorkspaceConfiguration
- deegree3/WorkspaceConfiguration/CRSConfiguration
- deegree3/WorkspaceConfiguration/CoverageStoreConfiguration
- deegree3/WorkspaceConfiguration/DataStoreOverview
- deegree3/WorkspaceConfiguration/FeatureStoreConfiguration
- deegree3/WorkspaceConfiguration/FeatureStoreConfiguration_3.0
- deegree3/WorkspaceConfiguration/FeatureStoreConfiguration_3.1
- deegree3/WorkspaceConfiguration/JDBCConfiguration
- deegree3/WorkspaceConfiguration/MetadataStoreConfiguration
- deegree3/WorkspaceConfiguration/ObservationStoreConfiguration
- deegree3/WorkspaceConfiguration/ProxyConfiguration
- deegree3/WorkspaceConfiguration/RemoteOWSStore
- deegree3/WorkspaceConfiguration/ServicesConfiguration
- deegree3/WorkspaceConfiguration/ServicesConfiguration/ExtendedCapabilities
- deegree3/WorkspaceConfiguration/StylesConfiguration
- deegree3/WorkspaceConfiguration/TileStoreConfiguration