Trip Layer
The Trip Layer can animate an object as it traverses space and time. Both the object's model and its path can be highly configured, allowing for detailed visualizations.
The Trip Layer can be used for a variety of use-cases, including fleet visualization.
Create a Trip Layer
To create a new Trip Layer, create a new layer, then select Trip Layer.
The following fields are available while creating a trip layer:
Field | Description |
---|---|
Type | Must be "Trip" to use the Trip Layer. |
Dataset | The dataset containing data for the trip layer. Either a GeoJSON dataset or a columnar dataset. |
Columns | The columns of the selected dataset from which the Trip Layer's data is derived. Either a GeoJSON column or table columns containing IDs, coordinates, timestamps, and optional altitude data. |
Color based on | A field to be used to calculate the color of the objects' trails. If no field is selected, you may choose a color to represent object trails. |
Color scale | When Color based on has a field selected, choose a scale by which to determine object coloring. |
Stroke width | The width of the moving objects' trails. Expand to enable Billboard, which orients the trail's geometry to the user's viewport, and a Stroke based on field, allowing you to base the width of the moving trails on a data column. |
Trail length | The length of the moving objects' trails. Expand to enable Fade Trail, fading the objects' trails as time passes. |
Label | An optional label affixed to each moving object. |
3D Model | An optional 3D model displayed for each moving object. Select from our library of 3D models or select Custom, then point to a link containing a .glb or .glTF file. |
GeoJSON as Input
GeoJSON data must contain LineString
in its features' geometry. LineString
must contain [longitude, latitude, altitude, timestamp]
. Valid timestamp formats include unix in seconds such as 1564184363
or in milliseconds such as 1564184363000
.
Example GeoJSON Input
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {
"vendor": "A"
},
"geometry": {
"type": "LineString",
"coordinates": [
[-74.20986, 40.81773, 0, 1564184363],
[-74.20987, 40.81765, 0, 1564184396],
[-74.20998, 40.81746, 0, 1564184409]
]
}
}
]
}
Columnar Datasets (CSV) as Input
Columnar datasets (typically loaded from a CSV file) you must contain an id
, latitude
, longitude
, timestamp
column (an altitude
column is optional). A path will be created by grouping the id
column and sorting by the timestamp
columns.
Example CSV Input
id | latitude | longitude | timestamp |
---|---|---|---|
A | 40.81773 | -74.20986 | 1564184363 |
A | 40.81765 | -74.20987 | 1564184396 |
A | 40.81746 | -74.20998 | 1564184409 |
B | 40.64375 | -74.33242 | 1565578213 |
B | 40.64353 | -74.20987 | 1565578217 |
B | 40.64222 | -74.33001 | 1565578243 |
Label Settings
Display a label containing any number of fields affixed to the moving objects.
Field | Description |
---|---|
Select a field | Select one or multiple fields to display on the label. If available, click # to select how label data is formatted. |
Font Size | Enter a value or slide to increase/decrease label size. |
Font Color | Select label font color. |
Background Color | Select label background color. |
Text Anchor | Select an anchor location from start , middle , and end . |
Text Alignment | Select label alignment from top , center , and bottom . |
3D Model Settings
The following sections reiterate the 3D models documentation, which also contains 3D model properties and settings.
Field | Description |
---|---|
3D Model | An optional 3D model displayed for each moving object. Select from our library of 3D models or select Custom, then point to a link containing a .glb or .glTF file. |
Apply Color | Apply a color of your choice or apply the trail's color to the 3D model. |
Size Scale | Size is scaled by a factor of 2^x where x is the slider value. |
Roll Based On | Set the model's roll (rotation on the X-axis) by choosing a field from the dataset or set it with the slider. |
Pitch Based On | Set the model's pitch (rotation on the Y-axis) by choosing a field from the dataset or set it with the slider. |
Yaw Based On | Set the model's yaw (rotation on the Z-axis) by choosing a field from the dataset or set it with the slider. |
Custom 3D Models
To use your own 3D model, you can provide a link to a glTF file with either a .gltf (JSON/ASCII) or .glb (binary) extension.
If you need to render many models on the map, please consider the number of polygons of your model. A model that is too detailed (containing a high number of polygons) may result in significant slowdowns of your visualization.
Note: Cross Origin Resource Sharing (CORS) must be enabled on the remote server hosting the 3D model. This allows Studio to retrieve the 3D model for your visualization.
Export as Video
To export an animated map, you can use Export Video feature.
Multiple Trip Layers
Consider the following when overlaying several trip layers:
- When you add multiple trip layers, the time range from each layers is combined. The animation control will span the entire time range for each layer.
- When hiding the trip layer, its animation control can be found in the filter panel.
Properties
For details on how to programmatically specify layer properties, refer to the Layer Configuration specification.
Updated about 2 months ago