textLabels.destroy
Removes one of your text labels for everyone. Its ID is not used again while the server runs.
Renamed in 0.28 from labels.destroy; see renamed names.
Signature
Section titled “Signature”textLabels.destroy(id: number): Promise<ActionResult>Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
id |
number |
The ID from textLabels.create. |
Returns
Section titled “Returns”A promise of an ActionResult: applied, or rejected with marker-not-found for an
ID that is not one of your text labels.
Example
Section titled “Example”import { textLabels } from "nativemp";
for (const marker of textLabels.listAll()) await textLabels.destroy(marker.id);Related
Section titled “Related”textLabels.create: make onetextLabels.update: change ittextLabels.listAll: all of themscriptMarkerDestroyed: it is gone