World of Warcraft Slippy Maps
PHP JavaScript Shell
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
dbc added (final) Azjol-Nerub instances Jan 19, 2012
logo working on a logo Jan 3, 2012
www first batch of work for adding automated labels to the map, including… Jun 28, 2012
.gitignore more mop build folders Jun 24, 2012
.htaccess need some indexes to help us browse this mess of files Jan 9, 2012 first batch of work for adding automated labels to the map, including… Jun 28, 2012 notes on finding new panda WMOs Jun 24, 2012 first batch of work for adding automated labels to the map, including… Jun 28, 2012
list.php simple php script to get list of files in each mpq - useful when debu… Jan 11, 2012

World-of-MapCraft - World of Warcraft Slippy Maps

To see the maps in action:

For an explanation of how it all works:

Generating the map tiles

This code will help you to generate your own set of map tiles. It wont work immediately out of the box - there's some fiddling involved. There are many more maps included in WoW than are used on the website - try extracting some different ones!


  • Make sure you have at least 10 GB of space!
  • Install ImageMagick
  • Install MPQExtractor & BLPConverter
    • Both of these tools require cmake to build
  • Create some folders:
    • mpqs - base MPQ files will go here
    • blps - extracedt BLP files will go here
    • pngs - PNGs converted from BLPs will go here
    • maps - Preview maps will go here
    • built - Final built tilesets will go here
    • It is very helpful for these folders to be accessible in a browser.
  • Modify build/config.php with the paths and URLs to these folders
  • Copy MPQ files from your WoW install, specifically:
    • art.MPQ
    • world.MPQ
    • wow-update-nnnnn.MPQ (multiple files)
    • wow-update-base-nnnnn.MPQ (multiple files)
    • You'll find them all inside the Data subfolder of your WoW installation


  • Extract the BLP and WMO files from the MPQs:

    • ./ is a good starting point
    • This will take a few minutes!
  • Run build/0_rename.php to fix path casing.

    • You don't need to do this if you have the -c option in MPQExtractor
  • Run build/1_convert.php to convert all of the BLP files to PNGs

    • This takes a while!
    • You should now have lots of sub-folders in the pngs folder
  • Run build/2_combine.php to make HTML previews or all the maps

    • You can now browse the maps subfolder and view everything you extracted
    • The files ending --16 use lower-resolution files so are good for quick previews
  • Once you know the tiles you want, modify the code at the top of build/3_build.php

    • The defaults are set for patch 4.3, extracting a few different maps - you may want more or less
    • They include combining multiple maps and patching over unused parts of tiles
    • This script builds the most-zoomed level of tiles for the final maps
    • The background colors specified here need to match build/colors.php
  • Run build/4_recombine.php to preview your creaed tilesets

    • The $size setting at the top lets you change the preview output size
    • Choose 16 or smaller to load the quick preview images
  • Run build/5_resize.php to build the other zoom levels

    • This will take a long time for big maps
  • You should now be able to view your slippy maps!

    • Modify www/index.php to point to the tiles
    • Also add the zoom levels & dimensions here
  • If you want to put the tiles on S3, use build/6_sync.php

  • To compress the PNGs for faster serving, use build/7_crush.php

  • If you want to make WMO maps, you'll need some extra tools:

    • build/wmo_build.php to assemble a flat image from a WMO group
    • build/wmo_assemble.php to assemble multiple flats into a tileset
    • From there, you can use build/5_resize.php to build the other zoom levels

Changes in MoP

  • art.MPQ has been renamed textures.MPQ
  • Expansion minimap textures have been moved to exspansionX.MPQ files
  • world2.MPQ is gone, with contents moved into a bunch of new MPQs
  • All patch MPQs have no prefix (this changed in cata in March 2012)

To find new WMOs to build and preview for MoP, I used the following commands:

find dungeon | grep pa_ | grep .blp | perl -pi -e's!_\d\d\d_\d\d_\d\d.blp!!' | \
    sort | uniq | perl -pi -e's/(.*)\/(.*?)$/$1!!$2/' >> wmos.txt
find pandaria | grep .blp | perl -pi -e's!_\d\d\d_\d\d_\d\d.blp!!' | \
    sort | uniq | perl -pi -e's/(.*)\/(.*?)$/$1!!$2/' >> wmos.txt

This found all WMO groups under either the pandaria folder, or inside the dungeons folder with a prefix of pa_. I then used this list to make a bunch of calls to build_wmo_map() in wmo_build.php.