LibMapData-1.0

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 "..map) end

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

  • Avatar of fbrevoort fbrevoort Apr 23, 2011 at 23:05 UTC - 0 likes

    Thanks for the 4.1 update!

  • Avatar of yoshimo yoshimo Apr 23, 2011 at 13:54 UTC - 0 likes

    @ fbrevoort should be done with r82

  • Avatar of fbrevoort fbrevoort Apr 17, 2011 at 08:25 UTC - 0 likes

    any plan update coming for BC maps in 4.1?

  • Avatar of silvanndev silvanndev Jan 21, 2011 at 03:43 UTC - 0 likes

    Hi,

    Minor thing: Orgrimmar has a new floor: Cleft of Shadow. Not necessary in my addon, but just thought I should post that.

  • Avatar of kagaro kagaro Dec 05, 2010 at 17:47 UTC - 0 likes

    they may put it back in, seems liek the keep putting it in and taking it out.

  • Avatar of mysticalos mysticalos Dec 02, 2010 at 06:38 UTC - 0 likes

    sad they changed their mind about BC maps :( i was so looking forward to complete deprication of zone name based location detections.

  • Avatar of myrroddin myrroddin Oct 27, 2010 at 22:23 UTC - 0 likes

    Just curious, I was playing with Addon Control Panel, and saw Lib:MapData-1.0 version 1.0.61 as not compatible with patch 4.01 is that because you still have the Compatible-With tag?

    It is working just fine, afaik, regardless.

  • Avatar of kagaro kagaro Oct 03, 2010 at 21:25 UTC - 0 likes

    I've got all the map data in the lib just missing the textures themselves for all bc instances

  • Avatar of mysticalos mysticalos Oct 03, 2010 at 20:03 UTC - 0 likes

    wish blizz would hurry up and add the missing BC maps, magisters terrace, hellfire ramparts, all the raids. missing that data is preventing a full change over to all things map based in 4.0 :)

  • Avatar of kagaro kagaro Sep 26, 2010 at 13:26 UTC - 0 likes

    ill be updating functions today, for continent and world map up/down scaling as well as fetching zone offsets.

Facts

Date created
May 30, 2010
Categories
Last update
Oct 17, 2014
Development stage
Release
Language
  • enUS
License
All Rights Reserved
Curse link
LibMapData-1.0
Reverse relationships
1
Downloads
162,225
Recent files
  • 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
  • A: r142 for 5.4.8 Oct 10, 2014
  • A: r141 for 5.4.0 Sep 12, 2013

Authors

Relationships

Tool used
DataTools
Embedded library
CallbackHandler-1.0
LibStub