The geospatial-configuration.json file
The geospatial-configuration.json file contains definitions of the mapping tiles and coordinate reference systems to use in your deployment. You can use this reference and example information when you create your own mapping configuration file.
Whether you choose to update the example provided, or create your own file, the geospatial-configuration.json contains the following key elements:
mapConfig
The mapConfig object defines the mapping tiles that are available.
The mapConfig object can contain a single instance of each of the following objects that are used to define the mapping view and to provide defaults for all mapping layers that are defined in the file.
center (Type: Lat/Long; Default: Undefined)
The geographic center of the map when it is first opened.
The lat and lng fields are used to specify the center point.
zoom (Type: Number; Default: Undefined)
The map zoom level when it is first opened.
maxBounds (Type: Lat/Long Bounds; Default: Undefined)
The maximum area that can be mapped by defining the coordinates of two diagonally opposite corners of a rectangle.
minZoom (Type: Number; Default: none)
The minimum amount the map can zoom (inclusive). If this option is not specified, the minimum zoom level is calculated as the highest minimum zoom option available in any defined GridLayer or TileLayer.
maxZoom (Type: Number; Default: none)
The maximum amount the map can zoom (inclusive). If this option is not specified, the maximum zoom level is calculated as the lowest maximum zoom option available in any defined GridLayer or TileLayer.
wrap (Type: Boolean; Default: True)
Whether any specified layers are wrapped around the antimeridian. If this option is set to false, the layer is only displayed once at low zoom levels.
Examples:
"mapConfig": {
"center": {
"lat": 52.202468,
"lng": 0.142655
},
"zoom": 8,
"maxBounds": {
"north": 60.84,
"south": 49.96,
"east": 1.78,
"west": -7.56
},
"minZoom": 2,
"maxZoom": 10,
"wrap": false,
...
}
In addition, depending on your mapping requirements, it must contain one or more base maps and can contain one or more overlays
baseMaps
A base map is an image that forms a background over which other GIS items are overlaid. All base maps must be hosted externally, and can be referenced by using a URL. If you would like to reference more than one base map, you can set a default that is used when a map is requested.
id (Type: Text; Default: none)
The unique identifier used to distinguish the layer. (Mandatory)
displayName (Type: Text; Default: none)
The name to use to refer to this map when the map is displayed. (Mandatory)
url (Type: String; Default: none)
The URL template for the tile server that hosts the mapping image. This URL can be a path to a standard image file format: png, or jpg, or a tile layer. (Mandatory)
The URL template can contain the following variables:
{x} and {y} - the tile coordinates
{z} - the zoom level
{s} - substituted with the list of subdomains, a separate request is made for each subdomain
{r} - add "@2x" to load retina tiles
Note: i2 Maps use tiles that are based on the EPSG:3857 projected coordinate system. Using an unsupported map type does not throw an error, but the map is not rendered correctly.
attribution (Type: String; Default: none)
Information about the origin of the map that is displayed in the lower right of the map.
Hyperlinks are supported alongside other text. You can identify hyperlinks by tagging them in the following format: [hyperlink]url[/hyperlink].
tilesize (Type: Number; Default: 265)
The tile size in pixels.
minZoom (Type: Number; Default: none)
The minimum amount the map can zoom (inclusive).
If this option is not specified, the minimum zoom level is calculated as the highest minimum zoom option available in the layer.
maxZoom (Type: Number; Default: none)
The maximum amount the map can zoom (inclusive).
If this option is not specified, the maximum zoom level is calculated as the lowest maximum zoom option available in the layer.
subdomains (Type: String array; Default: none)
Subdomains of the tile service. Can be passed in the form of a string array.
crossOrigin (Type: String; Default: Anonymous)
Defines how the tile server is configured to handle crossorigin requests. This can be one of the following values:
anonymous
use-credentials
""
tileBounds (Type: Lat/Long Bounds; Default: none)
The WGS84 bounds for the tiles, allowing you to constrain the tile loading area to a specific location. For example:
tileBounds: { west: 0.72235, east: 0.79101, south: 52.20424, north: 52.35211 }
defaultBaseMap (Type: Boolean; Default: False)
If there are multiple base maps, this option identifies the map to load initially.
Example:
"baseMaps": [
{
"id": "Esri.DeLorme",
"displayName": "Esri Delorme",
"url": "https://server.arcgisonline.com/ArcGIS/rest/services/Specialty/DeLorme_World_Base_Map/MapServer/tile/{z}/{y}/{x}",
"attribution": "Tiles © Esri — Copyright: © 2012 DeLorme"
}
]
overlays
An overlay is a type of map layer that is designed to provide additional information in addition to the base map. As these images for a secondary layer over the base map, you can set the opacity of an overlay to allow information present in the base map to be displayed.
id (Type: Text; Default: none)
The unique identifier used to distinguish the layer. (Mandatory)
displayName (Type: Text; Default: none)
The name to use to refer to this map when the map is displayed. (Mandatory)
url (Type: String; Default: none)
The URL template for the tile server that hosts the mapping image. This URL can be a path to a standard image file format: png, or jpg, or a tile layer. (Mandatory)
The URL template can contain the following variables:
{x} and {y} - the tile coordinates
{z} - the zoom level
{s} - substituted with the list of subdomains, a separate request is made for each subdomain
{r} - add "@2x" to load retina tiles
Note: i2 Maps use tiles that are based on the EPSG:3857 projected coordinate system. Using an unsupported map type does not throw an error, but the map is not rendered correctly.
attribution (Type: String; Default: none)
Information about the origin of the map that is displayed in the lower right of the map.
Hyperlinks are supported alongside other text. You can identify hyperlinks by tagging them in the following format: [hyperlink]url[/hyperlink].
tilesize (Type: Number; Default: 265)
The tile size in pixels.
minZoom (Type: Number; Default: none)
The minimum amount the map can zoom (inclusive).
If this option is not specified, the minimum zoom level is calculated as the highest minimum zoom option available in the layer.
maxZoom (Type: Number; Default: none)
The maximum amount the map can zoom (inclusive).
If this option is not specified, the maximum zoom level is calculated as the lowest maximum zoom option available in the layer.
subdomains (Type: String array; Default: none)
Subdomains of the tile service. Can be passed in the form of a string array.
crossOrigin (Type: String; Default: Anonymous)
Defines how the tile server is configured to handle crossorigin requests. This can be one of the following values:
anonymous
use-credentials
""
tileBounds (Type: Lat/Long Bounds; Default: none)
The WGS84 bounds for the tiles, allowing you to constrain the tile loading area to a specific location. For example:
tileBounds: { west: 0.72235, east: 0.79101, south: 52.20424, north: 52.35211 }
opacity (Type: Number; Default: 1.0)
The degree of visibility for objects on this layer. If set, the opacity must be a decimal between 0.0 (not visible) and 1.0 (fully visible).
Example:
"overlays": [
{
"id": "OpenMapSurfer_AdminBounds",
"displayName": "OpenMapSurfer Admin Bounds",
"url": "https://maps.heigit.org/openmapsurfer/tiles/adminb/webmercator/{z}/{x}/{y}.png",
"attribution": "Imagery from [hyperlink]http://giscience.uni-hd.de/ GIScience Research Group @ University of Heidelberg[/hyperlink] | Map data © [hyperlink]https://www.openstreetmap.org/copyright OpenStreetMap[/hyperlink] contributors"
}
]
coordinateSystems
The coordinateSystems object defines the coordinate reference systems that are available.
id (Type: Text)
The unique identifier used to distinguish the coordinate system.
displayName (Type: Text)
The name to use to refer to this coordinate system when displayed in the UI.
projString (Type: Text)
The projection string used to define the coordinate system. This string is a CRS definition.
editorType (Type: Text)
The controls to be used to label the x and y axis. This type can be:
LATITUDE_LONGITUDE - Ellipsoidal 2D CS
EASTING_NORTHING - Cartesian 2d CS E,N
X_Y - Cartesian 2d CS X,Y
bounds (Type: Lat/Long Bounds)
The area that can be mapped by defining the coordinates of two diagonally opposite corners of a rectangle. (Optional)
Example:
"coordinateSystems": [
{
"id": "EPSG:3081",
"displayName": "NAD83 / Texas State Mapping System",
"projString": "+proj=lcc +lat_1=27.41666666666667 +lat_2=34.91666666666666 +lat_0=31.16666666666667 +lon_0=-100 +x_0=1000000 +y_0=1000000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs",
"editorType": "X_Y"
}
]