Home > @magiclane/maps-sdk > SocialOverlay > deleteReport

SocialOverlay.deleteReport() method

Permanently removes a user's own report.

Deletes a social report created by the current user, removing it completely from the map for all users. Only the original report creator has authority to delete their reports. The operation executes asynchronously with result delivered via onComplete callback.

Signature:

static deleteReport(item: OverlayItem, onComplete?: (error: GemError) => void): ProgressListener | null;

Parameters

Parameter

Type

Description

item

OverlayItem

The social report overlay item to delete. Must be a valid social report created by the current user.

onComplete

(error: GemError) => void

(Optional) Callback invoked when operation completes or fails with: - GemError.success: Report successfully deleted - GemError.invalidInput: item is not a social report overlay item or not from alarm notification - GemError.accessDenied: User is not the report creator (only owner can delete)

Returns:

ProgressListener | null

ProgressListener if operation was successfully initiated, null otherwise