MapBox

Preparing a job

Once you've designed a beautiful map you need to send it to a TileMill instance for rendering. There can be several files required for rendering––XML, graphics, rasters, and fonts for example. We've designed a simple method that lets you package multiple files into a signal Zip file for submission. You can use Mac's Archive Utility, WinZip, or zip on linux machines to make the files.

Before you create the package, you must organize the files properly. Start by naming your Mapnik XML file yourmap.map.xml. You can use anything in place of "yourmap" as long as the file ends with the ".map.xml" extension.

Next, place any custom fonts in a sub-directory called "fonts." The instance will automatically install each font before beginning the rendering process.

Other files like graphics and rasters can be located anywhere within the directory structure as long as they are reference by the Mapnik XML file using the proper relative path.

Note that if you are not running a recent version of Cascadenik, the compiled Mapnik XML files will use absolute paths even if the paths in the source mml/mss are relative. If you notice absolute URLs in the compiled XML, either upgrade Cascadenik or run a search & replace to make sure the paths are relative. Otherwise, Mapnik will not be able to find your data.

When you're done organizing, Zip up the files in your directory. The final package should have structure similar to this:

mymap.zip:
  mymap.map.xml
  fonts/
    Comic Sans.ttf
    Helvetical.ttf
  mymarkerimage.png
  mysmalltiff.tif

With you Zip package ready, you're ready to submit it.