MapIcons
constMapIcons:object
Defined in: client/api.d.ts:7320
The game’s own map icons (shops, Floo Flames, collectibles, quests…) on the map and the minimap: hide them by category or one by one, and retitle their tooltips. Rules and labels belong to the resource that set them and go when it stops.
Type Declaration
Section titled “Type Declaration”categories()
Section titled “categories()”categories():
string[]
Every category name setHidden and list accept.
Returns
Section titled “Returns”string[]
clearLabel()
Section titled “clearLabel()”clearLabel(
id):boolean
Gives an icon its own tooltip back. False when it had no label.
Parameters
Section titled “Parameters”string
The icon’s id.
Returns
Section titled “Returns”boolean
list()
Section titled “list()”list(
category?):MapIcon[]
Every native icon the game has registered, which grows as the world streams in. Undiscovered icons are listed too, though the game draws them only once found. The few the game registers without a name are left out, so every id here is one setHidden and setLabel take; a category rule still covers those.
Parameters
Section titled “Parameters”category?
Section titled “category?”string
Only icons of this kind.
Returns
Section titled “Returns”MapIcon[]
reset()
Section titled “reset()”reset():
void
Drops every hide rule and label this resource set.
Returns
Section titled “Returns”void
setHidden()
Section titled “setHidden()”setHidden(
target,hidden):void
Hides native icons on the full map and the minimap. Icons the game registers later follow the rule as they arrive. An id rule beats a category rule; between resources, hidden wins. Script blips are never affected.
Parameters
Section titled “Parameters”target
Section titled “target”string
A category (see MapIcons.categories()), or else an icon id. Case doesn’t matter.
hidden
Section titled “hidden”boolean
true hides it on the map and the minimap; false lifts this resource’s rule. For an id, false also shows it through a hidden category.
Returns
Section titled “Returns”void
setLabel()
Section titled “setLabel()”setLabel(
id,title,description?):void
Retitles an icon’s map tooltip. The last setLabel for an id wins. Only the tooltip changes, not quest text or other UI.
Parameters
Section titled “Parameters”string
The icon’s id.
string
The tooltip title to show instead of the game’s.
description?
Section titled “description?”string | null
The tooltip description to show; an empty string hides it, and leaving it out keeps the game’s.
Returns
Section titled “Returns”void