question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add traffic animation layer

See original GitHub issue

Description

Deck.gl trip layer is probably the most popular layer so far. To support trip animation in kepler.gl, we will add a trip layer into it and allow customize animation.

Trip Layer

  • Add trip animation layer to animate paths from a sequence of points

  • Need to specify latitude, longitude, group by (id, uuid) and the timestamp column

  • Add a slider to adjust the tail length, add color by option

  • Automatically display a time playback slider when a trip layer is created

Implementation Plan

1. Data format

  • GeoJSON Trips data should be formatted as Geojson feature collection, each as a LineString. There are 2 ways time can be embeded for animation:
  1. Add a 4th element to LineString coordinates, formatted as epoch seconds. Each point coordinate should be as [longitude, latitude, altitude, timgstamp].
  2. Specify start_time and end_time in feature properties, and assign them in trip layer config. If only provide start time and end time, the animation will be in a constant speed.
{
 "type": "Feature",
 "properties": {
    “start_time”: “2019-06-10 17:00”,
    “end_time”: “2019-06-10 19:00”,
    “trip_uuid”: “928-19283-129”
 },
"geometry": {
  "type": "LineString",
  "coordinates": [
    [-122.48369693756104, 37.83381888486939, 0, 1562701757],
    [-122.49223709106445, 37.83337825839438, 0, 1562701758],
    [-122.49378204345702, 37.83368330777276, 0, 1562701790]
  ]
 }
}
  • CSV Gps points contained in csv from lat lng column can be used to create path by adding the group by (uuid, id, name, etc) and sort by (time, index, etc) option. Once a collection of path is created, it can be used to create trip layer.

2. Layer config

Trip layer should have the following configuration items:

  • Basic

    • Select geometry column (required)
    • Select start time column (optional)
    • Select end time column (optional)
  • Info

    • A How-to button (see icon layer)
    • Display instruction in a modal dialog to explain how trip layer works
  • Color

    • Select a single color
    • Or allow color based on to the selected color range and color scale
  • Animation control

    • Aniamtion control should be shown at the bottom of the map where the time span filter is
    • Animation control should allow adjust animation speed
  • Tail length

    • A slider to control tail length

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:6
  • Comments:16 (4 by maintainers)

github_iconTop GitHub Comments

4reactions
heshan0131commented, Aug 12, 2019

Target release date would be end of next week

3reactions
heshan0131commented, Jul 9, 2019

@yanhann10 will start to work on this starting today, estimated delivery would be mid August

Read more comments on GitHub >

github_iconTop Results From Across the Web

Animation Layers - Unity - Manual
You can manage animation layers from the Layers Widget in the top-left corner of the ... Select Additive to add the animation on...
Read more >
Animation Layers - Foundry Learn
Animation Layers · Open the Modo layout. · Click on the Time Viewport and Graph Editor Viewport buttons. · Click the Animation button...
Read more >
Animation Layer pane - Maya - Autodesk Knowledge Network
Using the options in the Show menu, you can specify whether you want the Animation Layer pane to display all animation layers you...
Read more >
Layer Animations - Slider Revolution
To add an additional animation, hover your mouse over the “Anim To” button and then click the plus icon. Then a new “Keyframe”...
Read more >
Traffic Layer | Maps JavaScript API - Google Developers
This example creates a map that uses a traffic layer to show real-time traffic information. Read the documentation.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found