WoW:API GetMapInfo: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
mNo edit summary
m (Move page script moved page API GetMapInfo to API GetMapInfo without leaving a redirect)
 
(6 intermediate revisions by 6 users not shown)
Line 1: Line 1:
<center>'''GetMapInfo''' ''-Documentation by [[user:Flickering|Flickering]]-''</center>
{{wowapi}}


  mapFileName, textureHeight, textureWidth = GetMapInfo();
  mapFileName, textureHeight, textureWidth, isMicrodungeon, microDungeonMapName = GetMapInfo();


Return the map information about the current world map texture.
Return the map information about the current world map texture.


----
== Parameters ==
;''Arguments''
=== Arguments ===
 
:''none''
:<i>none</i>
 
----
;''Returns''


=== Returns ===
:mapFileName, textureHeight, textureWidth
:mapFileName, textureHeight, textureWidth
:;mapFileName : String - The name of the file containing the textures for the current world map (<tt>nil</tt> for the whole world, BUT the official API catches this with a comment of <tt>Temporary Hack</tt> and uses the value "<tt>World</tt>" instead!)
:;textureHeight : Number - The height of the specified texture (0 if no texture)
:;textureWidth : Number - The width of the specified texture (0 if no texture) (<small>This is a guess, it's not used in the UI</small>)
----
;''Details''P


Note that the width and height aren't in a consistent order with most of the other API functions. Neither of the values are used by the UI so it's impossible to tell whether this is a deliberate inconsistency or a typo! The return values would appear to imply they are, however, reversed from the usual width, height convention. -- [[User:Flickering|Flickering]] 16:42, 26 Dec 2004 (EST)
* mapFileName (string) - The name of the file containing the textures for the current world map ('nil' for the whole world, BUT the official API catches this with a comment of 'Temporary Hack' and uses the value 'World' instead!)
* textureHeight (number) - The height of the specified texture (0 if no texture)
* textureWidth (number) - The width of the specified texture (0 if no texture) (This is a guess, it's not used in the UI)
* isMicroDungeon (Boolean) - 'true' if the current map is a MicroDungeon, 'false' otherwise.
* microDungeonMapName (string) - The name of the map for the current MicroDungeon, if applicable. (ex. ShrineofSevenStars)


----
== Details ==
{{Template:WoW API}}
Note that the width and height aren't in a consistent order with most of the other API functions. Neither of the values are used by the UI so it's impossible to tell whether this is a deliberate inconsistency or a typo! The return values would appear to imply they are, however, reversed from the usual width, height convention.
[[Category:API Functions|GetMapInfo]]
[[Category:API World Map Functions|GetMapInfo]]

Latest revision as of 04:46, 15 August 2023

WoW API < GetMapInfo

mapFileName, textureHeight, textureWidth, isMicrodungeon, microDungeonMapName = GetMapInfo();

Return the map information about the current world map texture.

Parameters[edit]

Arguments[edit]

none

Returns[edit]

mapFileName, textureHeight, textureWidth
  • mapFileName (string) - The name of the file containing the textures for the current world map ('nil' for the whole world, BUT the official API catches this with a comment of 'Temporary Hack' and uses the value 'World' instead!)
  • textureHeight (number) - The height of the specified texture (0 if no texture)
  • textureWidth (number) - The width of the specified texture (0 if no texture) (This is a guess, it's not used in the UI)
  • isMicroDungeon (Boolean) - 'true' if the current map is a MicroDungeon, 'false' otherwise.
  • microDungeonMapName (string) - The name of the map for the current MicroDungeon, if applicable. (ex. ShrineofSevenStars)

Details[edit]

Note that the width and height aren't in a consistent order with most of the other API functions. Neither of the values are used by the UI so it's impossible to tell whether this is a deliberate inconsistency or a typo! The return values would appear to imply they are, however, reversed from the usual width, height convention.