-
Notifications
You must be signed in to change notification settings - Fork 26
DTVF: Settings
This page details how to set up and configure global parameters and some of the more advanced features offered by the Digital Twin Visualisation Framework (DTVF). These are listed here (rather than in committed README files) as they are likely to pertain to the DTVF as a whole, independent of the selected map provider.
Each of these features/configuration options should be specified within a settings.json
file within the hosted directory of the visualisation (i.e. next to the index.html
file). The file should be a standard JSON object with one (or more) of the following fields.
The default position of the map can be specified via the start
field of the settings file. The specific fields within this node differ depending on the map provider; an example for each is detailed below.
The following snippet specifies the starting location of the map within Mapbox.
"start": {
"center": [60, 37],
"zoom": 2,
"bearing": 0,
"pitch": 45
}
The following snippet specifies the starting location of the camera within CesiumJS. Note that this is the position of the camera itself, not what it is looking at.
"start": {
"center": [7.621435, 49.180285, 50],
"heading": 90,
"pitch": -45,
"roll": 0.0
}
By default, a number of base imagery layers are provided by the framework; these are the Light, Dark, Outdoors, and Satellite styles provided by Mapbox, and can be used within Mapbox and Cesium visualisations. However, these options can be overridden by adding an imagery
node to the settings file. When present, this node should contained a list of key-value pairs in which the key is the user displayed name of the imagery layer, and the value its URL (your access token will be appended at runtime). Additionally, a default
entry can be added to set the pre-selected imagery when loading the map.
An example of a custom imagery
node is shown below.
"imagery": {
"Light": "https://api.mapbox.com/styles/v1/cmclinnovations/cl6p66equ000314pj8v0p60ub/tiles/256/{z}/{x}/{y}?access_token=",
"Dark": "https://api.mapbox.com/styles/v1/cmclinnovations/cl6owj7v2000415q1oj9aq5zq/tiles/256/{z}/{x}/{y}?access_token=",
"Outdoors": "https://api.mapbox.com/styles/v1/cmclinnovations/cl6p69s56000t14p47gpfhg1o/tiles/256/{z}/{x}/{y}?access_token=",
"Satellite (Raw)": "https://api.mapbox.com/styles/v1/mapbox/satellite-v9/tiles/256/{z}/{x}/{y}?access_token=",
"Satellite (Labelled)": "https://api.mapbox.com/styles/v1/mapbox/satellite-streets-v11/tiles/256/{z}/{x}/{y}?access_token=",
"default": "Dark"
},
Some features within the framework require each location to have an in-built name and description (such as the box shown when mousing over a location). by default, these fields within the data need to be named name
and description
; however, if the data uses fields with other names then you can remap these by using a fields
node within the settings. An example of using different fields in place of the name and description is shown below.
"fields": {
"name": "full_id",
"description": "operator"
}
TODO
- Home
- FAQ
- How to contribute
- Development guidelines:
- Containerisation:
- Examples
- Handling data:
- Visualisations: