Home > @magiclane/maps-sdk > LogMetadata
LogMetadata class
Provides metadata for a recorded sensor data log.
The LogMetadata object exposes information extracted from a recorded log file such as start/end timestamps and positions, route coordinates, activity details, user-provided metadata, and basic metrics. The LogMetadata class provides information about the recorded log via the Recorder class.
Do not construct this class directly; obtain an instance via RecorderBookmarks.getLogMetadata.
Signature:
export declare class LogMetadata extends GemAutoreleaseObject Extends: GemAutoreleaseObject
Properties
|
Property |
Modifiers |
Type |
Description |
|---|---|---|---|
|
|
number |
Total active recording time in milliseconds (excludes paused intervals). The active duration counts only periods when recording was actually running; any paused segments are excluded. | |
|
|
Activity details recorded with the log. This returns an ActivityRecord describing the activity metadata associated with the log (sport type, effort, visibility, etc.). | ||
|
|
DataType[] |
List of data types recorded in the log. Use this getter to discover which sensor/data streams were recorded. The returned list contains DataType values present in the log. | |
|
|
number |
Total duration of the log in milliseconds. This is the reported duration for the recorded log and is typically equal to endTimestampInMillis - startTimestampInMillis but may differ slightly depending on how samples are recorded. | |
|
|
Last recorded GPS coordinate in the log. Returns the most recent valid Coordinates recorded in the log. If the log contains no GPS samples, an invalid coordinate | ||
|
|
number |
Timestamp of the last sensor data in the log, in milliseconds since epoch. This value represents the timestamp of the final recorded sensor sample contained in the log and can be used together with startTimestampInMillis to compute durations. | |
|
|
boolean |
Whether the log file is marked as protected from automatic deletion. Protected logs are preserved even when automatic cleanup of old logs is performed due to space or retention settings. | |
|
|
boolean |
Whether the log file was uploaded to the server. Returns | |
|
|
Basic metrics computed for the log (distance, elevation gain, average speed). Returns a LogMetrics object containing summary metrics for the recorded log. | ||
|
|
number |
Size of the log file in bytes. | |
|
|
The precise, full-resolution route recorded in the log. The preciseRoute returns every recorded GPS sample from the log and should be used when an exact replay or analysis of the recorded path is required. This list can be large for long recordings. | ||
|
|
A simplified route sampled from the recorded log. The route contains coordinates selected from the full recording such that consecutive points are at least 20 meters apart or respecting a three-second delay rule; it is suitable for quick map rendering. Can be used to compute a path-based route. | ||
|
|
Sound annotations recorded within the log. Returns a list of SoundMark objects describing intervals where audio was recorded during the session. These marks are generated when audio recording is enabled in the Recorder during the session. | ||
|
|
First recorded GPS coordinate in the log. Returns the earliest valid Coordinates recorded in the log. If the log contains no GPS samples, an invalid coordinate | ||
|
|
number |
Timestamp of the first sensor data in the log, in milliseconds since epoch. This value represents the timestamp of the first recorded sensor sample in the log. It can be used to align log events with other time-based data. | |
|
|
TextMark[] |
Text annotations recorded within the log. Returns a list of TextMark objects created during the recording to annotate the log with short textual notes. These marks are added by calling Recorder.addTextMark while recording. | |
|
|
RecordingTransportMode |
Transport mode used during recording. The transport mode reflects the primary mode of movement (for example walking, driving, cycling) inferred or selected when the log was recorded. |
Methods
|
Method |
Modifiers |
Description |
|---|---|---|
|
Adds or overwrites custom metadata for the given key. The provided byte buffer will be stored in the log file's metadata area. If a value already exists for the same key it will be replaced. This operation is asynchronous and returns | ||
|
Retrieves custom user metadata stored with the given key. The method returns the raw byte buffer that was previously saved using addUserMetadata. If the key does not exist an asynchronous empty response is represented as | ||
|
Checks whether a given data type exists in the log. |