Thread: Location app?
View Single Post
03/14/14, 09:21 PM   #27
Xrystal
caritas omnia vincit
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 369
Map Pins ...

Well after I got the couple of reported bugs out of the way on the gatherer addon I thought I would give another stab at adding pins to the map ..

I added the following in PlayerActive:

-- New Object
xrgaPin = ZO_WorldMapPins:New()

-- Adding Pin
xrgaPin:AddCustomPin(MAP_PIN_TYPE_HARVEST_NODE)
xrgaPin:SetCustomPinEnabled(MAP_PIN_TYPE_HARVEST_NODE,true)


No error messages so guess I did something right somewhat there


Then when a node is harvested I do the following:

xrgaResult = xrgaPin:CreatePin(MAP_PIN_TYPE_HARVEST_NODE)
xrgaPin:RefreshCustomPins(MAP_PIN_TYPE_HARVEST_NODE)
local xrgaControl = xrgaResult:GetControl()
xrgaControl:SetShapeType(SHAPE_BOX)
xrgaControl:SetHidden(false)

xrgaPin.Controls = xrgaPin.Controls or {}
xrgaPin.Controls[#xrgaPin.Controls+1] = xrgaControl

Again no errors but, looking at xrgaPin I can see it adding controls for each custom pin but for some reason it isn't allowing it to be shown.

But getting tired now but sudden thought is that maybe next I would do SetMapPin with the control already created .. but the 3 values I can't imagine what they should be apart from coords.
  Reply With Quote