From the API functions sirinsidiator provided one should iterate over all map locations, check if it is visible, and get the icon name. Check if the icon name contains something like city and then hide it I assume.
Lua Code:
for mapLocationIndex=1, GetNumMapLocations(), 1 do
if IsMapLocationVisible(mapLocationIndex) then
local iconNameLower = GetMapLocationIcon(mapLocationIndex):lower()
if string.find(iconNameLower , "city") ~= nil then
--Hide the mapLocation at mapLocationIndex. I don't know how to get the "control" of that mapLocation though and so I'm not able to use :SetHidden() on it :-(
end
end
end
Maybe someone else who got more map expeience is able to help here
Just talked to Votan and there does not seem to be a gogd way so here is another approach:
if we are inside any subzone of the map (which will be a city, a dungeon, whatever) we can let the function IsMapLocationVisible always return false so the pins won't be shown/added anymore. This should affect all pins hopefully.
Lua Code:
ZO_PreHook("IsMapLocationVisible", function()
if GetParentZoneId ~= nil then
local zoneId, subZoneId
zoneId = GetParentZoneId ()
if zoneId ~= nil then
local zoneIndex = GetUnitZoneIndex("player")
if zoneIndex ~= nil then
subZoneId = GetZoneId(zoneIndex)
if subZoneId ~= nil then return true end
end
end
end
return false
end)
Insert this function into the small addon's "HideMe v3" code via a text editor and try it. It should be placed inside the function for event_addon_loaded
"local function Addon_Loaded(eventCode, addOnName)", at the end before the closing end:
Lua Code:
local function Addon_Loaded(eventCode, addOnName)
if addOnName ~= HideMe.name then return end
...
ZO_PreHook("IsMapLocationVisible", function()
if GetParentZoneId ~= nil then
local zoneId, subZoneId
zoneId = GetParentZoneId ()
if zoneId ~= nil then
local zoneIndex = GetUnitZoneIndex("player")
if zoneIndex ~= nil then
subZoneId = GetZoneId(zoneIndex)
if subZoneId ~= nil then return true end
end
end
end
return false
end