When you are in a Legion zone you should se on your worldmap a green circle around the next nearest flightpoint where the whistle will bring you.
so the function GetPlayerMapPosition() is no longer valid. so there i can use C_Map.GetPlayerMapPosition() in combination with C_Map.GetBestMapForUnit()
but(!) i found nothing for GetNumMapLandmarks() and GetMapLandmarkInfo() to gather the taxinode pois
Lua Code:
local function GetNode()
local node
local distance
local index
for k = 1, GetNumMapLandmarks() do
local n = {}
n.type, n.name, n.description, n.textureIndex, n.x, n.y = GetMapLandmarkInfo(k)
if n.type == LE_MAP_LANDMARK_TYPE_TAXINODE then --LE_MAP_LANDMARK_TYPE_TAXINODE is a constant defined by Blizzard
local d = GetDistance(n.x, n.y)
if distance == nil or d < distance then
n.index = k
distance = d
node = n
end
end
end
return node
end