API:RemoveMapInstance
From RoR Wiki
UI Lua API · MapDisplay functions
Version: WAR 1.4.8
Releases the map data the client keeps for a map display window.
RemoveMapInstance(windowName)
Arguments
- windowName
string– Name of the map display window.
Returns
Nothing.
Details
- The client keeps a map instance for each map display window that has been set up. This function looks up the instance registered under
windowName, releases it, and removes the entry. - If no instance is registered under that name, nothing happens and no error is raised.
- The window itself is not destroyed or hidden.
- Nothing happens if the map system does not exist yet.
- Exactly one argument must be passed.
Errors
None besides the generic Invalid Parameters message when the argument is missing or not a string.
Example
Windows with a map display remove it in their shutdown handler, from default/ea_overheadmapwindow/source/overheadmapwindow.lua:
-- OnShutdown Handler
function EA_Window_OverheadMap.Shutdown()
RemoveMapInstance( "EA_Window_OverheadMapMapDisplay" )
end
