For the past few days, I've reviewed this change and remain at a loss.
The Zygor devs coded their Addon to automatically call GetPOIMapInfo whenever the map opens or changes, so the data appears to initialize at call-time. I believe this negates the need to create the map pins like how other Addons do it. (example from ChronicCollector.lua)
Here's their code from Zygor's pointer.lua file with my edits based on Dan's reply:
Lua Code:
_GetPOIMapInfo_ORIG_ZGV = GetPOIMapInfo
function GetPOIMapInfo( map, id, truthful )
if truthful then
return _GetPOIMapInfo_ORIG_ZGV( map, id )
end
local normalizedX, normalizedY, poiPinType, icon, isShownInCurrentMap, linkedCollectibleIsLocked, isDiscovered, isNearby = _GetPOIMapInfo_ORIG_ZGV( map, id )
if icon:find("icon_missing") then
icon = ZGV.DIR.."/Arrows/Stealth/cbni0-o1egp.dds"
end
if poiPinType == not (isDiscovered or isNearby) then
poiPinType = MAP_PIN_TYPE_INVALID
else
poiPinType = MAP_PIN_TYPE_POI_SEEN
end
LMP:CreatePin( poiPinType, "pin-"..id, normalizedX, normalizedY )
return normalizedX, normalizedY, poiPinType, icon, isShownInCurrentMap, linkedCollectibleIsLocked, isDiscovered, isNearby
end
I tried a series of method calls with most throwing null or undefined errors.
Lua Code:
ZO_WorldMapPins:CreatePin(poiPinType, id, normalizedX, normalizedY)
Lua Code:
CreateSinglePOIPin( map, id)
Lua Code:
g_mapPinManager:CreatePin(poiPinType, "testing", normalizedX, normalizedY)
Lua Code:
ZO_MapLocations:AddLocation( map )
The last thing I tried was the popular LibMapPins library. The Library does receive the required data.
via
Lua Code:
LMP:CreatePin( poiPinType, "pin-"..id, normalizedX, normalizedY )
However, I do not see undiscovered pins on the map. That's where I get lost. Any ideas on what I'm missing?