Skip to main content
Skip table of contents

Example Mapping Configuration Properties - SuperWEB2

The following is an example of a complete set of mapping configuration properties. The annotations on the right side explain what the settings do. 

{
 
    "dumpCodes" : ["185", "285", "385", "485", "585", "685", "785", "-1"],
Mapping will not be available if the table contains any of the fields with these codes.
    "disconnectedMode" : false,
Mapping will not use disconnected mode.
    "localFeatureUrlHostName" : "localhost",

Mapping will use "localhost" as the hostname of the Tomcat instance when making a request to another of the REST endpoints.

    "thematic" : {
 
        "defaults" : {
            "joinFieldType" : "STRING",
            "maxRanges" : 5,
            "selectionColours" : {
                "noData" : {
                    "fillColour" : "#FFFF7A"
                },
                "selection" : {
                    "fillColour" : "#969696"
                }
            },
            "opacity" : 200,
            "defaultClassificationAlgorithm" : "NaturalBreaks",
            "spatialReference" : "4326",
            "selectionLimit" : 1000,
            "defaultRanges" : 5
        },

This section defines the mapping defaults.

These settings will apply to all layers unless they are specifically overridden for a given layer.

        "layers" : [
 
            {
                "bindings" : [{
                        "field" : "Area",
                        "databases" : ["bank", "customer"],
                        "valueSet" : "C_State"
                    }
                ],
                "featureLayerId" : 26,
                "nameField" : "STE_NAME",
                "joinField" : "STE_CODE",
                "name" : "States",
                "arcgisServiceURL" : "http://myarcgisserver.com/arcgis/rest/services/bank/MapServer/26",
                "dynamicImageLayerIds" : [26]
            }, 

This section defines the first set of layer-specific settings.

This layer applies to both:

  • The C_State value set in the Area field in the bank dataset.
  • The C_State value set in the Area field in the customer dataset.

This layer definition binds both these value sets to the STE_CODE field (ID: 26) on the external mapping server.

The joinFieldType for the external field is not specifically set here, so it will use the setting from the defaults (STRING).

            {
                "chunkSizes" : {
                    "client" : 5,
                    "server" : 5
                },
                "bindings" : [{
                        "field" : "Area",
                        "databases" : ["bank"],
                        "valueSet" : "C_Geography_2"
                    },
                    {
                        "field" : "Area",
                        "databases" : ["customer"],
                        "valueSet" : "C_Stat_Divisions"
                    }
                ],
                "nameField" : "SD_NAME",
                "name" : "Statistical Divisions",
                "featureLayerId" : 16,
                "dynamicImageLayerIds" : [16],
                "joinField" : "SD_CODE",
                "arcgisServiceURL" : "http://myarcgisserver.com/arcgis/rest/services/bank/MapServer/16"
            }, 

This section defines the second set of layer-specific settings.

In this example the layer applies to both:

  • The C_Geography_2 value set in the Area field in the bank dataset.
  • The C_Stat_Divisions value set in the Area field in the customer dataset.

This layer definition binds both these value sets to the SD_CODE field (ID: 16) on the external mapping server. As with the first layer, the type of the external field is not set, so it will use the default.

This layer also specifies the chunk sizes that will be used by the browser and the server when transferring the geographical data.

            {
                "chunkSizes" : {
                    "client" : 10,
                    "server" : 10
                },
                "bindings" : [{
                        "field" : "Area",
                        "databases" : ["bank"],
                        "valueSet" : "C_Geography_1"
                    },
                    {
                        "field" : "Area",
                        "databases" : ["customer"],
                        "valueSet" : "C_Stat_Sub_Divisions"
                    }
                ],
                "nameField" : "SSD_NAME",
                "name" : "Statistical Sub Divisions",
                "featureLayerId" : 25,
                "dynamicImageLayerIds" : [25],
                "joinField" : "SSD_CODE",
                "arcgisServiceURL" : "http://myarcgisserver.com/arcgis/rest/services/bank/MapServer/25"
            },

This section defines the third set of layer-specific settings.

In this example the layer applies to both:

  • The C_Geography_1 value set in the Area field in the bank dataset.
  • The C_Stat_Sub_Divisions value set in the Area field in the customer dataset.

This layer definition binds both these value sets to the SSD_CODE field (ID: 25) on the external mapping server.

            {
                "chunkSizes" : {
                    "client" : 30,
                    "server" : 30
                },
                "bindings" : [{
                        "field" : "Area",
                        "databases" : ["bank"],
                        "valueSet" : "C_Geography_0"
                    },
                    {
                        "field" : "Area",
                        "databases" : ["customer"],
                        "valueSet" : "C_Postcodes"
                    }
                ],
                "nameField" : "POA_CODE_SX",
                "name" : "Post Codes",
                "featureLayerId" : 11,
                "dynamicImageLayerIds" : [11],
                "joinField" : "POA_CODE_SX",
                "arcgisServiceURL" : "http://myarcgisserver.com/arcgis/rest/services/bank/MapServer/11"
            }

This section defines the fourth set of layer-specific settings.

In this example the layer applies to both:

  • The C_Geography_0 value set in the Area field in the bank dataset.
  • The C_Postcodes value set in the Area field in the customer dataset.
This layer definition binds both these value sets to the POA_CODE_SX field (ID: 11) on the external mapping server.
        ]
    },
 
    "palette" : {
        "swatches" : [{
                "name" : "Red-Grey",
                "colours" : ["#FA463C", "#F57350", "#F5AA8C", "#FAF0E1", "#FFFFF2"]
            }, {
                "name" : "Yellow-Grey",
                "colours" : ["#FAA02D", "#F5C35A", "#F5DC8C", "#FAF0E1", "#FFFFF2"]
            }, {
                "name" : "LightBlue-Grey",
                "colours" : ["#2D78D7", "#55A5E1", "#96D7E6", "#E6F5EB", "#FFFFF2"]
            }, {
                "name" : "DarkBlue-Grey",
                "colours" : ["#2D55C8", "#5A82E1", "#82A5F0", "#DCE1F5", "#F2FFFF"]
            }, {
                "name" : "LightGreen-Grey",
                "colours" : ["#6EA532", "#91C35A", "#BEE17D", "#E6F5EB", "#FFFFF2"]
            }, {
                "name" : "DarkGreen-Grey",
                "colours" : ["#326E3C", "#5F9B5F", "#A0D2A5", "#E6F5EB", "#FFFFF2"]
            }, {
                "name" : "Purple-Grey",
                "colours" : ["#DC3C73", "#DC6EAA", "#E1A0E6", "#E6E6FA", "#F2FFFF"]
            }
        ]
    },
    "defaultPalette" : "Red-Grey"
}

This section defines the colour palette for mapping.

It defines 7 sets of colour swatches, each containing 5 colour values used for the individual ranges.

See Configure Mapping Colours - SuperWEB2 for more details about configuring the mapping colours.

For more details on any of these settings, see Mapping Property Reference - SuperWEB2.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.