Add traffic animation layer
See original GitHub issueDescription
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.
-
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:
- Add a 4th element to
LineString
coordinates, formatted as epoch seconds. Each point coordinate should be as[longitude, latitude, altitude, timgstamp]
. - Specify
start_time
andend_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:
- Created 5 years ago
- Reactions:6
- Comments:16 (4 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Target release date would be end of next week
@yanhann10 will start to work on this starting today, estimated delivery would be mid August