API C Map.GetBestMapForUnit

Returns the current UI map for the given unit. Only works for the player and group members.
 uiMapID = C_Map.GetBestMapForUnit(unitToken)
==Arguments==
:;unitToken: : UnitId
==Returns==
:;uiMapID: : UiMapID - Returns the "lowest" map the unit is on. For example, if a unit is in a microdungeon it will return that instead of the zone or continent map.
==Details==
==Example==
Prints the current map for the player.
/run local mapID = C_Map.GetBestMapForUnit("player"); print(format("You are in %s (%d)", C_Map.GetMapInfo(mapID).name, mapID))
-- You are in Stormwind City (84)
==Patch changes==