Home > @magiclane/maps-sdk > LogMetadata > addUserMetadata
LogMetadata.addUserMetadata() method
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 true when the write succeeded.
Signature:
addUserMetadata(key: string, userMetadata: Uint8Array): Promise<boolean>;Parameters
Parameter | Type | Description |
|---|---|---|
key | string | The string key to associate with the metadata. |
userMetadata | Uint8Array | A Uint8Array containing the data to store. |
Returns:
Promise<boolean>
A Promisetrue on success, false on failure.