Small library that provides mapfile data. it include width,height, upper left x,y and lower right x,y. This data includes multi-floor maps such as the new instances.

API Documentation

To get the mapfile names use GetMapInfo() on the current map. Filenames are constant across localizations.

Sample usage:

     mapfiles = LibStub("LibMapData-1.0"); 
     -- get the size of Coth defaulting to the first floor size
     local width,height = mapfiles:MapArea('CoTStratholme')
     -- get the size of the 8th floor of icc 
     width,height = mapfiles:MapArea('IcecrownCitadel',8) 
     -- get the size of the Arati mapfile.
     width,height = mapfiles:MapArea('Arathi')

The floors are optional and if a given floor is not found 0,0 will be returned. This lib came about as a result of several addons needing the data, and simply copying and pasting them in each copy occupies around 44k of memory.

LibMapData now supports Mapchanged callback event. Sample usage:

mapfiles = LibStub("LibMapData-1.0"); 
mapfiles:RegisterCallback("MapChanged",function(event,map,floor,w,h) print("Map is now " end

You must login to post a comment. Don't have an account? Register to get one!

  • Avatar of Sellenity Sellenity Jul 16, 2015 at 15:59 UTC - 0 likes

    no hellfire citadel :( Grid Priest AOE doesnt work!

  • Avatar of burny_dd burny_dd Jun 15, 2015 at 12:45 UTC - 0 likes

    I'm not quite happy with the MapChanged event fired by the library. When you change the zone with the world map open no event is fired which is okay. But when the world map then is closed there is still no event fired and in effect the zone change notification is completely lost.

    Also it seems the transition from Shadowmoon Valley to the player garrison sometimes produces (0, 0) as player position GetPlayerMapPosition("player") after the Blizzard ZONE_CHANGED* event and so no event "MapChanged" event is fired by the lib. For my purpose I work around it by checking if LibMapDaty:MapAreaId(mapfile) is valid for the current map instead of checking the player position.

    The first rule of Tautology Club is the first rule of Tautology Club.

  • Avatar of BNSSNB BNSSNB May 19, 2013 at 04:34 UTC - 0 likes

    library.lua 2163 line last less comma ","

  • Avatar of kagaro kagaro May 18, 2013 at 19:57 UTC - 0 likes

    i just updated the lib with 5.3 data, and for omega1970 ill go double check it, it seems i may have a floor parsing issue when the is a senario and normal map for the same area.

  • Avatar of omega1970 omega1970 Mar 16, 2013 at 12:50 UTC - 0 likes

    Hi m8,

    Getting some strange numbers in the Shrine of the Seven Stars, the range seems to be multiplied by 10.....on the Isle of the Thunder King, range seems to be divided by 10 when using the lib:Distance function.

  • Avatar of myrroddin myrroddin Oct 23, 2012 at 00:55 UTC - 0 likes

    And fixed Revision with r121, sorry about that people.

  • Avatar of myrroddin myrroddin Oct 22, 2012 at 23:57 UTC - 0 likes

    @myrroddin: Go

    I did a commit in version r119 that fixes the typo, adds Revision keyword (careful when you commit next time), deleted the hard-embedded Libs folder, and I forgot in the changelog: LibStub now pulls from Trunk rather than a specific version. See LibStub's page for details. I jumped to the appropriate section.

  • Avatar of myrroddin myrroddin Oct 22, 2012 at 14:07 UTC - 0 likes

    You have a typo on line 38 in r118.

    local worlMapHeight = 31809.64857610083

    This should be

    local worldMapHeight = 31809.64857610083

    You missed the "d" in "world".

  • Avatar of kagaro kagaro Oct 18, 2012 at 19:37 UTC - 1 like

    Fixed, forgot to check the map flag in the dbc files

  • Avatar of Cortello Cortello Oct 16, 2012 at 23:09 UTC - 0 likes

    I'm getting a size of 274 x 183 yards for Kezan and The Lost Isles, which is absolutely tiny - it's a third of the size of Dalaran and I'm pretty certain it's wrong

    Astrolabe gives 1352 x 900 yards for Kezan, and 4515 x 3010 yards for The Lost Isles, but that doesn't mean much as the two libraries differ quite widely for all the zones

    Am I missing something? Or can this be fixed in LibMapData please?


    I have checked the WorldMapArea.dbc data, and Astrolabe appears to have it right:

    • Kezan 1352.087 x 900 yards
    • The Lost Isles 4514.58 x 3010.417 yards


    I decided to try changing the LibMapData tables myself, but see that the mapData table has seven floors for both Kezan and The Lost Isles, and none of those floors have anything like the dimensions I expect. What's going on here please?

    Last edited Oct 17, 2012 by Cortello


Date created
May 30, 2010
Last update
Dec 22, 2014
Development stage
  • enUS
All Rights Reserved
Curse link
Reverse relationships
Recent files
  • A: r147 for 6.0.3 Dec 22, 2014
  • A: r146 for 6.0.3 Nov 21, 2014
  • R: 0.31 for 6.0.2 Oct 17, 2014
  • A: r144 for 6.0.2 Oct 17, 2014
  • A: r143 for 6.0.2 Oct 16, 2014



Tool used
Embedded library