As posted in that other forum.
To walk up the maps from where you are to the continent you're on:
Lua Code:
local thisMapType = 0
local mapID = C_Map.GetBestMapForUnit("player")
while thisMapType ~= 2 do
local mapDetails = C_Map.GetMapInfo(mapID)
local thisMapID = mapDetails.MapID
local thisMapName = mapDetails.name
thisMapType = mapDetails.mapType
local thisMapParent = mapDetails.parentMapID
mapID = thisMapParent
print(type(thisMapType), thisMapType, thisMapName)
end
mapTypes
Code:
0 = "Cosmic"
1 = "World"
2 = "Continent"
3 = "Zone"
4 = "Dungeon"
5 = "Micro"
6 = "Orphan"