Mapping Configuration Tutorial
There are a number of steps involved in configuring mapping:
Step 1 - Create a List of Field IDs and Geographical Value Set IDs
The first step is to obtain the IDs of the fields and value sets that you want to display in Map View. You can obtain these from SuperADMIN using the following command:
cat <dataset_id> <field>
Where:
<dataset_id>
is the ID of the SXV4 with the geographical field.<field>
is the name of the geographical field.
For example, in the following dataset (ID: RoadSafetyData) there is a field called Accident Location that contains details of the geographical location of a road traffic accident:
> cat RoadSafetyData "Accident Location"
[ XTAB Field : 'Accident Location' ]
[ ID : 'SXV4__RoadSafetyData__F_Accidents__Local_Authority_(District)_FLD' ]
[ Value Set : 'SXV4__RoadSafetyData__C_Country' ]
[ Value Set : 'SXV4__RoadSafetyData__C_Regions' ]
[ Value Set : 'SXV4__RoadSafetyData__C_LocalArea' ]
[ Value Set : 'SXV4__RoadSafetyData__C_Location' ]
As shown here, this field is a hierarchy containing four nested geographical value sets.
Field IDThe format of the field ID returned in SuperADMIN is:
TEXT
To configure mapping, you need the
In some cases, you can use the field name (in this case
Accident Location , although this does not work for multilingual datasets).
| Value Set IDThe format of the value set name returned in SuperADMIN is:
TEXT
To configure mapping, you need the In this example the value set IDs you need are therefore: |
Step 2 - Create Geographic Layers in your Third Party Mapping Service
Use your third party mapping tools to create the geographical layers on the external mapping service for each of the fields you want to map.
Currently, SuperWEB2 supports ArcGIS Server 10.0 and the Web Feature Service (WFS) Interface Standard.
Where possible, make sure that the data on the mapping server covers all of the geographical field items in the SXV4. If there are field items in the SXV4 that do not match up with any layers on the mapping service, then Map View may not be able to generate a map when those items appear in the table.
If you have field items in your geographical fields that are genuinely non-geographical (such as "Other" or "Unknown") then you may want to use SuperWEB2's dump codes feature to prevent users from accessing Map View when non mappable items appear in a table.
Step 3 - Configure the Thematic Mapping Layers in SuperADMIN
The next step is to configure a thematic mapping layer for every mappable field. This is done in SuperADMIN. You need to define:
- Some default settings. These will apply to all layers unless specifically overridden.
- A definition for each individual layer. This will define:
The layer bindings. These are the links between an SXV4 value set containing mappable items and a corresponding field in the shapefile. The field in the shapefile must have values that exactly match the codes from the value set in the SXV4. This binding tells SuperWEB2 how to join the items in the SXV4 with the corresponding geographical boundary.
- Any default properties you want to override for this layer. Any properties you do not specifically set for a given layer will use the default value.
The easiest way to set up the thematic mapping layers is to define the settings in a text file and then import this into SuperADMIN. The following examples can be used as a basis for constructing your own mapping defaults. Copy the example to a text file and then edit accordingly for your deployment:
ArcGIS Sample Configuration
GeoServer Sample Configuration
See Mapping Property Reference for full details on each of these settings. The important ones that you will need to change based on your ArcGIS mapping service are:
spatialReference | The spatial reference ID, indicating which coordinate reference system to use. You can obtain the relevant value for this from the mapping server. |
---|---|
bindings | The SXV4 value set this configuration applies to. If you have multiple fields that contain the same geographical data (for example you have multiple datasets with an Area field that contains information relevant to Australian states and suburbs) then you can bind a single layer definition to multiple SXV4 value sets and datasets. |
arcgisServiceURL | The URL of the REST endpoint for the ArcGIS or GeoServer mapping server that will provide the geometry layer. |
joinField | The field on the mapping server that this layer maps to. |
joinFieldType | Whether the joinField is a STRING or NUMBER type field. In the examples here, all layers are mapping to fields of the type STRING , so this is defined in the defaults rather than being defined in every layer. |
nameField | The field on the mapping server contains the names associated with the shapes for this layer. The names are displayed in Map View if a user clicks on the region. Please note that as these names come from the mapping server, they will be displayed in whatever language they were configured to use in the mapping server, regardless of the dataset or user interface language that is currently selected in SuperWEB2. |
featureLayerId | The ID of the layer on the mapping server that contains the geometric data for this value set. |
dynamicImageServiceURL | The URL of the REST endpoint for the mapping server that will provide the outline/boundary images (this is the background layer image that shows the areas that can be selected; it is a transparent image that only shows boundary outlines and labels). |
dynamicImageLayerIds | An array of IDs of the layers on the mapping server that contain the outline/boundary images. |
The following settings are required when connecting to a WFS mapping service, but can be omitted for connections to ArcGIS servers:
type | Either arcgis or wfs (defaults to arcgis ). |
---|---|
outputformat | Whatever the WFS server supports to return GeoJSON. This setting is only read for WFS servers. If omitted, it will default to application/json (which is the supported value for GeoServer). |
geometryField | The field in your feature layer that has the actual geometry. This setting is only read for WFS servers. If omitted, it will default to the_geom (which is the default value for GeoServer). |
You will also need to add and remove layers as appropriate depending on how many mappable fields you have. Each layer needs to be enclosed in curly brackets and separated by commas.
Import the Settings
Once you have finished editing the mapping settings in your text file, use the following command in SuperADMIN to import your new settings and replace the current mapping layer definitions:
cfg global superweb2.mapping.thematic load <filename>
For example:
cfg global superweb2.mapping.thematic load E:\Configuration Files\Mapping Settings.json
Next Steps
You may also need to complete these configuration steps:
- Configure caching settings.
- Check and update the base map configuration.
- Configure dump codes to block Map View when certain field items are in the table.
- Configure the map colours.