Timeline Functions
Animation is a core feature of Unfolded maps, and the Map SDK's timeline endpoints provide a full complement of functions to let applications control this feature.
Set Timeline Configuration
Sets time filter timeline configuration. Allows you to set timeline visibility, play/pause the animation, set the speed, set the time interval, and change the time format/timezone.
const unfoldedMap = new UnfoldedMap({
mapUUID: 'MAP-UUID-GOES-HERE',
embed: true,
});
const startTime = new Date('2020.10.29').getTime();
const endTime = new Date('2020.10.31').getTime();
const config = {
idx: 0,
currentTimeInterval: {
startTime: startTime,
endTime: endTime
},
timezone: 'Europe/Berlin',
timeFormat: 'DD.MM.YYYY. HH:mm'
};
unfoldedMap.setTimelineConfig(config).then(data => {
console.log(data);
});
from unfolded.map_sdk import UnfoldedMap
unfolded_map=UnfoldedMap(
mapUUID='4883beab-e8db-42e0-8a66-7093eea255f4'
)
unfolded_map
# ...
unfolded_map.set_layer_timeline_config({
'current_time': 1567557949266.6873,
'is_visible': True,
'is_animating': True,
'speed': 1,
})
Set Layer Timeline Configuration
Sets layer timeline configuration used with the Trips
layer. Allows you to set timeline visibility, play/pause the animation, set the speed, set the time interval, and change the time format/timezone.
Note:
Currently in development. Only supported by JavaScript SDK.
const unfoldedMap = new UnfoldedMap({
mapUUID: 'MAP-UUID-GOES-HERE',
embed: true,
});
const time = new Date('2020.10.29').getTime();
const config = {
currentTime: time,
timezone: 'Europe/Berlin',
timeFormat: 'DD.MM.YYYY. HH:mm'
};
unfoldedMap.setLayerTimelineConfig(config).then(data => {
console.log(data);
});
Not yet supported. Coming soon.
setLayerTimelineConfig reference
Get Timeline Information
Gets the information object for the time filter timeline control.
Note:
Currently in development. Only supported by JavaScript SDK.
const unfoldedMap = new UnfoldedMap({
mapUUID: 'MAP-UUID-GOES-HERE',
embed: true,
appendToDocument: true
});
unfoldedMap.getTimelineInfo(0).then(data => {
console.log(data);
});
Not yet supported. Coming soon.
Get Layer Timeline Information
Gets information object for the layer timeline control used with Trips layer.
Note:
Currently in development. Only supported by JavaScript SDK.
const unfoldedMap = new UnfoldedMap({
mapUUID: 'MAP-UUID-GOES-HERE',
embed: true,
appendToDocument: true
});
unfoldedMap.getLayerTimelineInfo().then(data => {
console.log(data);
});
Not yet supported. Coming soon.
Updated about 1 month ago