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.


The Trip Layer showing flights over France.

GeoJSON 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]
        ]
      }
    }
  ]
}

CSV 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

idlatitudelongitudetimestamp
A40.81773-74.209861564184363
A40.81765-74.209871564184396
A40.81746-74.209981564184409
B40.64375-74.332421565578213
B40.64353-74.209871565578217
B40.64222-74.330011565578243

Settings

The following sections detail every setting available in the Trip Layer.

Basic

Core settings for the Trip Layer.

SettingDescription
TypeMust be "Trip" to use the Trip Layer.
DatasetThe dataset containing data for the trip layer. Either a GeoJSON dataset or a columnar dataset.
ColumnsThe 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

SettingDescription
Color Based OnA 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 ScaleThe color scale and palette of the layer.
OpacityThe opacity/transparency of the layer.

Stroke Width

Stroke settings for the Trip Layer.

SettingDescription
Stroke WidthThe width of the moving objects' trails.
BillboardOrients the stroke's geometry toward the viewport.
Stroke Based OnA field to base stroke width on.
Stroke ScaleThe scale by which to grow strokes based on the attribute column. Choose from linear, sqrt, and log.

Trail Length

Settings related to the trails of the moving objects.

SettingDescription
Trail LengthThe length of the moving objects' trails.
Fade TrailWhen enabled, fade the objects' trails as time passes.

Label Settings

Label settings for the Trip Layer. Labels appear affixed to the Trip Layer's moving objects.

SettingDescription
Label FieldSelect a field to display on the label.
Font SizeThe size of the font to use on the label.
Font ColorThe color of the label font.
Outline WidthThe width of the outline in pixels. Set to 0 to disable the outline.
Outline ColorThe color for the outline label.
Background ColorToggle to enable a background color for the label. Choose a color with the color selector.
Text AnchorWhere, relative to the trip object, to anchor the text. Choose from start, middle, or end.
AlignmentHow to align the text. Choose from top, middle, or bottom.
+ Add More LabelsAdd another label to the trip objects.

3D Model Settings

The following sections reiterate the 3D models documentation, which also contains 3D model properties and settings.

FieldDescription
3D ModelAn 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 ColorApply a color of your choice or apply the trail's color to the 3D model.
Size ScaleSize is scaled by a factor of 2^x where x is the slider value.
Roll Based OnSet the model's roll (rotation on the X-axis) by choosing a field from the dataset or set it with the slider.
Pitch Based OnSet the model's pitch (rotation on the Y-axis) by choosing a field from the dataset or set it with the slider.
Yaw Based OnSet 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.

JSON config editor for trip layer

Programmatically control your trip layer animations in our JSON code editor, or copy the configuration and paste it in other maps.

JSON config editor for trip layer

JSON config editor for trip layer

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.

JSON Schema

For details on how to programmatically specify layer properties, refer to the Layer Configuration specification.