WoW:Events/Map

Event API

"I" iconNote that this page is automatically generated; editing it is pointless. To edit event descriptions, edit the entries in the alphabetical pages, e.g. Events/A, Events/B, etc. Changes there will be copied over to here within a few hours.

Map related events

"CLOSE_WORLD_MAP"
Category: Map
 

Supposed to fire whenever the world map is closed/hidden, though it doesn't. A workaround for this is to use "WORLD_MAP_UPDATE" to set a global variable to use elsewhere with an OnUpdate function; e.g.

 local Map_Changed = false;
 
 function MyAddon_OnEvent()
  if ( (event == "WORLD_MAP_UPDATE") and WorldMapFrame:IsVisible() ) then
   Map_Changed = true;
  end
 end
 
 function MyAddon_OnUpdate()
  if ( (Map_Changed) and not WorldMapFrame:IsVisible() ) then
   ''...do this...''
   Map_Changed = false;
  end
 end

When the second function is called, it checks to see if the map has been opened/closed (Map_Changed), then checks to see if the map is currently open (WorldMapFrame).
The effect is a code that executes only when the map closes.

"MINIMAP_PING"
Category: Map
 

Fired when the minimap is pinged.

arg1
UnitId of the one that created the ping (ie "player" or any of the group members)
arg2
x
arg3
y
"MINIMAP_UPDATE_ZOOM"
Category: Map
 

Fired when the minimap scaling factor is changed. This happens, generally, whenever the player moves indoors from outside, or vice versa. There are no arguments to this event. To test the player's location, compare the minimapZoom and minimapInsideZoom CVars with the current minimap zoom level (see GetZoom).

This event does not relate to the + and - minimap zoom buttons.

"MINIMAP_UPDATE_TRACKING"
Category: Map
 

Added in 2.3, this event is fired when the player selects a different tracking type from the menu attached to the mini map. There seems to be no useful arguments as of the time of this writing.

arg1
Mouse button used to click the tracking button (i.e. "LEFTBUTTON")
"WORLD_MAP_NAME_UPDATE"
Category: Map
 
"WORLD_MAP_UPDATE"
Category: Map
 

Fired when the world map should be updated.

When entering a battleground, this event won't fire until the zone is changed (i.e. in WSG when you walk outside of Warsong Lumber Mill or Silverwing Hold --Salanex

"ZONE_CHANGED"
Category: Map
 

Fired when the player enters a new zone. Zones are the smallest named subdivions of the game world and are contained within areas (also called regions). Whenever the text over the minimap changes, this event is fired.

"ZONE_CHANGED_INDOORS"
Category: Map
 

Fired when a player enters a new zone within a city.

"ZONE_CHANGED_NEW_AREA"
Category: Map
 

Fired when the user enters a new zone and a new area. e.g. moving from Duskwood to Stranglethorn Vale. In interface terms, this is anytime you get a new set of channels. The ZONE_CHANGED events are mutually exclusive!

Note: When this event fires, the UI may still think you're in the zone you just left. Don't depend on GetRealZoneText() and similar functions to report the new zone in reaction to ZONE_CHANGED_NEW_AREA. (untested for similar events)