mapIcons.destroy
Removes one of your map icons for everyone. Its ID is not used again while the server runs.
Signature
Section titled “Signature”mapIcons.destroy(id: number): Promise<ActionResult>Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
id |
number |
The ID from mapIcons.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 map icons.
Example
Section titled “Example”import { mapIcons } from "nativemp";
for (const marker of mapIcons.listAll()) await mapIcons.destroy(marker.id);Related
Section titled “Related”mapIcons.create: make onemapIcons.update: change itmapIcons.listAll: all of themscriptMarkerDestroyed: it is gone