api/HereBeDragons-Pins-2.0

HereBeDragons-Pins-2.0 is a library to place pins on the World and Mini Map. Pins are ordinary frames which get positioned appropriately on the map by HBD-Pins.

Coordinate Systems and Map Identifiers

See the main API/HereBeDragons-2.0 page for an explanation on the two main coordinate systems and map identifiers HereBeDragons uses.

API

An overview of the HBD-Pins API, its arguments and return values.

Pins:AddMinimapIconWorld(ref, icon, instanceID, x, y, floatOnEdge)

Add a icon to the minimap, specified by World coordinates

Parameters

ref
Reference to track the icons under, typically a reference to your addon
icon
The icon frame
instanceID
The instance ID of the world coordinate system
x
X world coordinate
y
Y world coordinate
floatOnEdge
Flag if the icon should float on the edge of the map when it goes beyond the visible area, or be hidden.

Pins:AddMinimapIconMap(ref, icon, uiMapID, x, y, showInParentZone, floatOnEdge)

Add a icon to the minimap, specified by the uiMapID and local zone coordinates

Parameters

ref
Reference to track the icons under, typically a reference to your addon
icon
The icon frame
uiMapID
UI Map ID of the map to place the icon on
x
X position in local zone coordinates
y
Y position in local zone coordinates
showInParentZone
Flag if the icon should be shown in the parent zone (if any) of the specified zone. If false, it'll only be shown in the specified zone.
floatOnEdge
Flag if the icon should float on the edge of the map when it goes beyond the visible area, or be hidden.

Pins:IsMinimapIconOnEdge(icon)

Check wether an icon is floating on the edge of the map

Pins:RemoveMinimapIcon(ref, icon)

Remove the specified Minimap Icon

Parameters

ref
Reference to track the icons under, typically a reference to your addon
icon
The icon frame

Pins:RemoveAllMinimapIcons(ref)

Remove all minimap icons registered to the reference "ref"

Parameters

ref
Reference to track the icons under, typically a reference to your addon

Pins:AddWorldMapIconWorld(ref, icon, instanceID, x, y, showFlag, frameLevelType)

Add a Icon to the World Map using World Coordinates

Parameters

ref
Reference to track the icons under, typically a reference to your addon
icon
The icon frame
instanceID
The instance ID of the world coordinate system
x
X world coordinate
y
Y world coordinate
showFlag
Flag where to show the pin. If no flag is specified, the pin is only shown on the specified map.
Possible options:
HBD_PINS_WORLDMAP_SHOW_PARENT - Show pin on the specified map and zone parent maps
HBD_PINS_WORLDMAP_SHOW_CONTINENT - Show pin on parent and the continent map
HBD_PINS_WORLDMAP_SHOW_WORLD - Show pin on parent, continent and the world map
frameLevelType
Optional Frame Level type registered with the WorldMapFrame, defaults to PIN_FRAME_LEVEL_AREA_POI

Pins:AddWorldMapIconMap(ref, icon, uiMapID, x, y, showFlag, frameLevelType)

Add a Icon to the World Map using uiMapID and local zone coordinates

Parameters

ref
Reference to track the icons under, typically a reference to your addon
icon
The icon frame
uiMapID
UI Map ID of the map to place the icon on
x
X position in local zone coordinates
y
Y position in local zone coordinates
showFlag
Flag where to show the pin. If no flag is specified, the pin is only shown on the specified map.
Possible options:
HBD_PINS_WORLDMAP_SHOW_PARENT - Show pin on the specified map and zone parent maps
HBD_PINS_WORLDMAP_SHOW_CONTINENT - Show pin on parent and the continent map
HBD_PINS_WORLDMAP_SHOW_WORLD - Show pin on parent, continent and the world map
frameLevelType
Optional Frame Level type registered with the WorldMapFrame, defaults to PIN_FRAME_LEVEL_AREA_POI

Pins:RemoveWorldMapIcon(ref, icon)

Remove the specified World Map Icon

Parameters

ref
Reference to track the icons under, typically a reference to your addon
icon
The icon frame

Pins:RemoveAllWorldMapIcons(ref)

Remove all World Map icons registered to the reference "ref"

Parameters

ref
Reference to track the icons under, typically a reference to your addon

Pins:GetVectorToIcon(icon)

Compute the vector to an icon, see API/HereBeDragons-2.0 GetWorldVector for usage.

Pins:SetMinimapObject(minimapObject)

Set an alternative Minimap to draw icons on, or nil to reset back to the original.