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 kagaro kagaro Nov 28, 2011 at 13:02 UTC - 0 likes

    ThePants99 - yes Cyprias - Yes

    License was set as all rights reserved to counter those 3rd party rehosting sites

  • Avatar of ThePants999 ThePants999 Sep 10, 2011 at 18:30 UTC - 0 likes

    Hi - can I get permission to use this in my addon?

  • Avatar of gOOvER gOOvER Jul 15, 2011 at 07:51 UTC - 0 likes

    Bad idea to add no Licence. Noone can use this Lib in own addons ;)

  • Avatar of Cyprias Cyprias Jul 08, 2011 at 04:19 UTC - 0 likes

    Hey kagaro, can I get permission to use your library in my addon TotemRadius? Your license is All Rights Reserved so though I'd ask first.

  • Avatar of mysticalos mysticalos Jul 02, 2011 at 15:21 UTC - 0 likes

    wait blizz hot fixed it? sigh.

  • Avatar of kagaro kagaro Jul 02, 2011 at 00:15 UTC - 0 likes

    Issue solved, they didnt flag the map in the dbc files as being mixed outdoors mode and had the floors in backwards. extractor now accounts for that

  • Avatar of kagaro kagaro Jul 01, 2011 at 23:20 UTC - 0 likes

    Mysticalos can you double check the area I'd isn't swapping on those floors

  • Avatar of mysticalos mysticalos Jul 01, 2011 at 18:08 UTC - 0 likes

    i say try to find something closely resembling 1587.0, 1058.0

    i remember ulduar for example, was also goofy in this way, the staging area was listed under a diff zone, and rest of sizes were listed with wrong area ids. something similar could be at work here, i'm sure the sizes are just at the wrong numbers because of the spit. 1587.0, 1058.0 is probably not perfect exact and i'd like more precise, still can't open mpq files on my mac though :( mpq extractors haven't worked since format was changed in 4.x

  • Avatar of kagaro kagaro Jul 01, 2011 at 10:57 UTC - 0 likes

    I'll update to reflect mysticalos, the dbc data is way wrong I'm nit sure why. The dbc files only shows 2 floors period not 3 but the map drop down shows 3 floors. I wasn't able to get into the zone myself either last night I was using data provided by others as to size

  • Avatar of mysticalos mysticalos Jul 01, 2011 at 02:37 UTC - 0 likes

    firelands sizes are still wrong, the blizz api also reported wrong sizes sigh i used /dumb GetMapInfo() and those are sizes it reportegd and i plugged into dbm but they are way way WAY off in areas 2 and 3 still.

    here are real ones for area 1 and 2 at least verified in game using actual calculations and mage blink (20 yards)
    oldschool methods!

        1, 1587.0, 1058.0,     -- The Firelands (this one is as cose to accurate as i could get it
        2, 1440.0, 960)        -- Sulfuron Keep (looks like this one actually was right)

    I could not find area 3 yet cause i cannot access it in game until. maybe that's the one that's 375.0, 250.0? that's what i'm gonna assume for now. WTF is up with blizzards invalid sizes in data files AND GetMapInfo() api anyways?

    Last edited Jul 01, 2011 by mysticalos


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