-
Notifications
You must be signed in to change notification settings - Fork 16
Map OpenLayers 6 Canvas
The map canvas is based on the OpenLayers 6 library. This provides a lot of functionality not available in the old OpenLayers 2 map configuration. This new canvas is still in active development but is in use in production atlases.
"canvasType": "map"
Selects this canvas
"canvasName": "<string>"
Name of this canvas for widgets and anything else to register against
"coordinates": {
"initialBounds":
"<minX>",
"<minY>",
"<maxX>",
"<maxY>"
],
"autoInitialBounds": <boolean>
}
Initial coordinates to fit into the map view when the module loads. If no bounds are provided the map will load, but will not be in a useful location. autoInitialBounds
can be set to true
or false
but currently isn't working, see issue https://github.com/GCRC/nunaliit/issues/1082
"backgrounds": [<array of background configs>]
Every map should have at least on background layer. Each background config has fields name, type and options.
"backgrounds": [
{
"name": "<string>",
"type": "<string>",
"options": {<options>}
}
]
- name: Label for this background layer
- type: One of
"bing"
,"wms"
,"wmts"
,"osm"
,"stamen"
.
Provide options with keys:
- `"key": "": Bing API key from Bing service
-
"imagerySet": <string>
: Imagery set to use, see Bing documentation (https://docs.microsoft.com/en-us/bingmaps/rest-services/imagery/get-imagery-metadata)
Provide options with keys:
-
"url": <string>
: URL template to use. See https://wiki.openstreetmap.org/wiki/Slippy_map_tilenames for details on URL structure. An example URL that will work is"https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png"
Provide options with keys:
-
"url": <string>
: URL template to use. See http://maps.stamen.com/#toner/ for details on URL structure. An example URL that will work is"https://stamen-tiles-{s}.a.ssl.fastly.net/toner/{z}/{x}/{y}{r}.png"
-
"layerName": "<string>"
: One of"toner"
,"terrain"
,"watercolor"
. See http://maps.stamen.com/ for details
Stadia backgrounds require the use of an account in order to set up domain authentication or an API key. It is recommended that domain-based authentication is used.
Provide options with keys:
-
"layerName": "<string>"
: One ofalidade_smooth
,alidade_smooth_dark
,outdoors
,stamen_toner
,stamen_terrain
,stamen_watercolor
, orosm_bright
. See https://docs.stadiamaps.com/themes/ for (free) themes
Provide options with keys:
-
"url": "<string>"
: WMS url -
"layers": "<string>"
: WMS layer -
"srs": "<string>"
: Source reference system projection (e.x. "EPSG:3338") -
"styles": "<string>"
: (optional) WMS styles -
"wmsLegend": "<boolean>"
: (optional) defaults to false. If true a legend will be fetched and displayed in the legend widget. -
"WIDTH": "<string>"
: (optional) WMS width parameter. -
"HEIGHT": "<string>"
: (optional) WMS height parameter. -
"VERSION": "<string>"
: (optional) WMS version parameter. -
"BBOX": "<bbox>"
: (optional) WMS bbox parameter. -
"CRS": "<string>"
: (optional) WMS CRS (coordinate reference system) parameter. - `"bgcolor": "": (optional) Background color parameter (e.x. -9999).
Provide options with keys:
-
"url": "<string>"
: The URL of the WMTS server -
"layer": "<string>"
: A string containing the layer name, to be assembled by the WMTS server. -
"style": "<string>"
: A string containing the style name, to apply style to each named layer. -
"requestEncoding": "<string>"
: Sets the encoding (REST|KVP) of the tile requests. -
"numZoomLevels": "<integer>"
: Sets the number of zoom levels associated with the service. -
"matrixSet": "<string>"
: Sets the matrixSet/projection name associated with the layer. -
"srsName": "<string>"
: (optional) Sets the projection associated with the layer. -
"layername": "<string>"
: (optional) Sets the layername associated with the layer. -
"opacity": "<string>"
: (optional) Sets the opacity associated with the layer. -
"isBaseLayer": "<boolean>"
: (optional)true
orfalse
.
Overlays to show on the map. Each entry in the overlay array has configuration for that overlay.
"overlays": [
{
"name": "2070's - RCP8.5 (in.)",
"type": "wms",
"visibility": false,
"swipe": "right",
"options": {}
]
-
"name": "<string>"
: Name of the layer type : String that specifies the type of overlay. Possible values are: "couchdb", "model" and "wms". options : Object defining parameters. Based on the type of overlay. clustering : (optional)true
orfalse swipe: (optional)
leftor
right. Defaults to showing on both sides. Requires that
layerSwipeis
true. visibility: (optional) if
truethe layer is visible by default, if
false` it is hidden by default.
Gets features from couchdb query. Options:
-
"layerName": <string>
: String that specifies the layer identifier.
Fetch features to display from a model (https://github.com/GCRC/nunaliit/wiki/Nunaliit-Documentation-for-Atlas-Builders#atlas_model). Options:
-
"sourceModelId": <string>
: The model ID to get features from.
Same options as for WMS background, see: https://github.com/GCRC/nunaliit/wiki/OpenLayers-6-Canvas#wms
See the conditional map styling documentation at https://github.com/GCRC/nunaliit/wiki/Nunaliit-Documentation-for-Atlas-Builders#conditional-map-styling
Configuration that can be provided but has defaults.
-
"layerSwipe": <boolean>
: Defaults to false. When set to true the map will have a slider in the middle that can be moved left and right to show layers based on their config. Overlay layers will be displayed on the right, left or both depending on theswipe
config. Valid options are:-
"swipe": "right"
: Overlay displayed on the right side of the slider. -
"swipe": "left"
: Overlay displayed on the left side of the slider. -
swipe
config set to any other value or left out: Overlay displayed on both sides of the slider.
-
-
"wmsGetFeatureInfo": <boolean>
:true
orfalse
, defaults to false. If true then clicking on the WMS overlays will request feature info from the WMS service and display the value in a popup dialog. -
"couchDbSourceTitle": <string>
: Title to use for the couchDb layer in the layer chooser`