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.
To get the mapfile names use GetMapInfo() on the current map. Filenames are constant across localizations.
Sample usage:
mapfiles=LibStub("LibMapData-1.0");--getthesizeofCothdefaultingtothefirstfloorsizelocalwidth,height=mapfiles:MapArea('CoTStratholme')--getthesizeofthe 8thflooroficcwidth,height=mapfiles:MapArea('IcecrownCitadel',8)--getthesizeoftheAratimapfile.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("Mapisnow"..map)end