Krowi's World Map Buttons
If you develop addons for World of Warcraft, you know how much work goes into the small details. Placing a single button on the world map sounds simple until you realize you need to handle positioning, version differences, and layout shifts when other buttons appear or disappear. That is exactly the problem Krowi's World Map Buttons solves. This lightweight library gives developers a clean, reliable way to add custom buttons to the world map interface without reinventing the wheel every time.
What This Library Actually Does
At its core, Krowi's World Map Buttons is a development library built around the World Map Button Library (Krowi_WorldMapButtons-1.4). Instead of writing your own positioning logic, you call a single function and the library handles the rest. It creates your button, places it in the top-right corner of the map, and manages the layout automatically as buttons are shown or hidden.
The library also takes care of Blizzard's default map buttons, such as tracking and options, integrating them into the same layout system so nothing overlaps. It uses the standard LibStub structure, which means dependency management stays familiar and clean for anyone who has worked with other Ace-style libraries.
Key Features at a Glance
- Easy button integration: add a custom button with one function call using your own XML template.
- Automatic positioning: buttons stack neatly in the top-right corner of the world map.
- Dynamic layout: when a button hides, the remaining buttons shift to fill the gap while keeping their order.
- Default button integration: Blizzard's tracking and options buttons are managed automatically.
- Independent operation: no dependency on other addons for world map modifications.
- LibStub support: a standard library structure for straightforward dependency handling.
Compatibility Across World of Warcraft Versions
One of the strongest selling points of Krowi's World Map Buttons for World of Warcraft is its multi-version support. The library detects the game version at runtime and adjusts its behavior accordingly. On Retail (Mainline, 11.x and beyond), buttons are stacked vertically from top to bottom, each one 32 pixels below the previous. On Classic variants, the arrangement flips to a horizontal right-to-left layout, since those clients use a different map frame structure.
Supported versions include Retail, Classic Era, TBC Classic, Wrath Classic, Cataclysm Classic, and Mists of Pandaria Classic. The library exposes helpful properties like IsMainline and HasNoOverlay so your own code can branch cleanly when needed. It also hooks the correct refresh event for each client, meaning buttons update properly when you open the map, switch zones, zoom, or change continents.
How the Positioning System Works
By default, buttons are placed with an X offset of 4 and a Y offset of -2. If those values do not suit your design, you can call SetOffsets with your own coordinates to fine-tune placement. The library recalculates positions internally whenever the layout changes, so you never have to manually shuffle frames around. Your button mixin simply implements standard methods like OnLoad, OnClick, OnEnter, and Refresh, and the library calls them at the right moments.
Developers who prefer a hands-off setup often grab the addon through the foxygame.net launcher, where Krowi's World Map Buttons sits in a browsable catalog and installs with a single click, complete with automatic updates that keep the library current across game patches.
How to Install and Get Started
If you are an addon author ready to try it, here is the short version of how to install. First, download Krowi's World Map Buttons from your preferred addon source and place the folder inside your World of Warcraft Interface/AddOns directory. Make sure LibStub is present, since the library relies on it. Next, embed the library in your own addon or declare it as a dependency, then request the library instance through LibStub using the Krowi_WorldMapButtons-1.4 key.
From there, create your button template in XML, call the Add function with your template name and the BUTTON frame type, and implement the mixin methods you need. The library returns the created frame, so you can store it and update its state inside Refresh whenever the map opens or changes. Custom offsets are optional but useful if your UI has other elements near the map corner.
Common Use Cases
- Quick access to addon features directly from the world map.
- Toggling custom map overlays or pins on and off.
- Opening configuration panels without hunting through menus.
- Displaying addon-specific information in a map context.
- Filtering or searching map data with a dedicated control.
Final Thoughts
Krowi's World Map Buttons removes a genuinely tedious piece of addon development. Instead of wrestling with frame anchoring, version detection, and layout gaps, you get a tested library that handles all of it with a couple of function calls. Whether you are building for Retail or any of the Classic flavors, the consistent API and automatic layout management make it a smart foundation for any map-related feature. For developers who value clean code and predictable results, this library is well worth adding to the toolkit.