Use C_Map.GetBestMapForUnit("player") to get the current uiMapID for the player or WorldMapFrame:GetMapID() to get the uiMapID map currently displayed in the World Map Frame UI.
It was removed in patch 8.0.1.
Returns the WorldMapAreaID of the currently displayed area map, and whether quest objectives should be shown.
mapID, isContinent = GetCurrentMapAreaID()
Returns[]
mapID
number - WorldMapAreaID of the currently displayed area map
isContinent
boolean - from FrameXML's QuestMapFrame.lua, it is false for for any zone map, and true for Cosmic, Azeroth, and Maelstrom maps. Presumably used to determine if quest objectives should be shown or not.
Notes[]
This can be used as a locale-independent way to identify zones.
Since this function identifies the current map, rather than the current zone, if you want the mapID for the current zone, you should call SetMapToCurrentZone before calling this function. However, you should not do this when the map UI is visible, as the user may be intentionally viewing another zone's map, and this function will change the displayed map without any confirmation or warning.