Skip to content

Appendix C: mapParameters Field

This appendix provides a detailed description of the "mapParameters" field, one of the fields used to define each of the Formbird components below:

1 Purpose

The "mapParameters" field is a set of name/value fields that define the properties of a map, including:

  • The co-ordinates (latitude and longitude) at which to initially centre the map.
  • One or more map views e.g. satellite view, street map view.
  • The minimum and maximum map resolution.
  • The initial zoom level.

2 Definition

The table below lists and describes the name/value pair fields used to define the properties of a map.

Note:

  1. Default values for the fields described in the tables below are shown in bold text.

2.1 Optional Customizable Fields

Field Valid Values Description
defaultLat Valid latitude The latitude, written as a decimal, at which to initially centre the map field.
Valid latitude values range from 0 to (+/–)90.

Example:
"defaultLat": -37.9563
-37.8 Default value.
defaultLon Valid longitude The longitude, written as a decimal, at which to initially centre the map field.
Valid longitude values range from 0 to (+/–)180.

Example:
"defaultLon": 145.0407
144.9 Default value.
defaultZoom Integer The level at which to initially zoom the map field.

Example:
"defaultZoom": 15
10 Default value.
mapViews Array of map view definitions An array of map view definitions, each defining the properties of a map view.
Each map view definition is a set of name/value pair fields, some being required, some being optional.
See Appendix D: mapViews Field for a list and description of the name/value pair fields used to define a map view.
maxResolution Decimal number The maximum resolution at which the map will be visible.

Example:
"maxResolution": 2116.670900008467
? Default value.
minResolution Decimal number The minimum resolution at which the map will be visible.

Example:
"minResolution": 0.0116670900008467
? Default value.

3 Example

"MapParameters" field definition with:

  • Default latitude and longitude values.
  • Maximum and minimum resolution values.
  • Initial zoom level.
  • A "mapViews" array containing 3 individual map view definitions and 1 group map view definition.
    (Appendix D: mapViews Field has a detailed description of the fields used to define these map views).
    "mapParameters": {
        "defaultLat": -37.8,
        "defaultLon": 144.9,
        "defaultZoom": 12,
        "maxResolution": 2116.670900008467,
        "minResolution": 0.0116670900008467,
        "mapViews": [
            {
                "EPSG": "EPSG:3857",
                "isShow": true,
                "params": {
                    "BBOX": "16133701.716224,-4393099.8016821,16446787.78408,-4080013.733826",
                    "FIRSTTILE": true,
                    "FORMAT": "image/png",
                    "HEIGHT": "512",
                    "LAYERS": "CARTO_WM",
                    "REQUEST": "GetMap",
                    "SERVICE": "WMS",
                    "SRS": "EPSG:3857",
                    "STYLES": "",
                    "VERSION": "1.1.1",
                    "WIDTH": "512"
                },
                "serverType": "geoserver",
                "uiLabel": "V",
                "url": "https://base.maps.vic.gov.au/service"
            },
            {
                "EPSG": "EPSG:3857",
                "params": {
                    "BBOX": "16280475.531304,-4696291.0150527,16593561.59916,-4383204.9471967",
                    "FIRSTTILE": true,
                    "FORMAT": "image/png",
                    "HEIGHT": "512",
                    "LAYERS": "AERIAL_WM",
                    "REQUEST": "GetMap",
                    "SERVICE": "WMS",
                    "SRS": "EPSG:3857",
                    "STYLES": "",
                    "VERSION": "1.1.1",
                    "WIDTH": "512"
                },
                "serverType": "geoserver",
                "url": "https://base.maps.vic.gov.au/service",
                "uiLabel": "S"
            },
            {
                "crossOrigin": null,
                "serverType": "tile",
                "uiLabel": "O",
                "url": "https://osm.formbird.com/tiles/{z}/{x}/{y}.png"
            },
            {
                "groupView": [
                    {
                        "EPSG": "EPSG:3857",
                        "params": {
                            "BBOX": "16280475.531304,-4696291.0150527,16593561.59916,-4383204.9471967",
                            "FIRSTTILE": true,
                            "FORMAT": "image/png",
                            "HEIGHT": "512",
                            "LAYERS": "AERIAL_WM",
                            "REQUEST": "GetMap",
                            "SERVICE": "WMS",
                            "SRS": "EPSG:3857",
                            "STYLES": "",
                            "VERSION": "1.1.1",
                            "WIDTH": "512"
                        },
                        "serverType": "geoserver",
                        "url": "https://base.maps.vic.gov.au/service"
                    },
                    {
                        "EPSG": "EPSG:3857",
                        "params": {
                            "BBOX": "16446787.78408,-4393099.8016821,16759873.851936,-4080013.733826",
                            "FIRSTTILE": true,
                            "FORMAT": "image/png",
                            "HEIGHT": "512",
                            "LAYERS": "CARTO_OVERLAY_WM",
                            "REQUEST": "GetMap",
                            "SERVICE": "WMS",
                            "SRS": "EPSG:3857",
                            "STYLES": "",
                            "VERSION": "1.1.1",
                            "WIDTH": "512"
                        },
                        "serverType": "geoserver",
                        "url": "https://base.maps.vic.gov.au/service"
                    }
                ],
                "uiLabel": "M"
            }
        ]
    }