Once you’ve finished a map design, you can export your map for use in other applications. You can export the entire world or choose a smaller region by setting the bounding box. TileMill can export a variety of formats and each has different advantages. With a TileMill project open, the export menu at the top-right of the window and presents a number of options. The Upload and MBTiles options will export pannable, zoomable maps just like the preview you see in TileMill. Any legends and interactive elements will be included. Depending on what you are exporting, this process can take up considerable time and disk space. The MBTiles option creates a package of tiles that can be used in a variety of ways. You can upload them to a MapBox account, host them yourself with TileStream or transfer them to MapBox for iPad for offline access. Technical details about MBTiles files can be found in the MapBox developers documentation. If you have a MapBox account you can connect it with your TileMill installation and use the Upload export to streamline the process of creating an MBTiles file and uploading it to MapBox. The PNG, PDF, and SVG export options allow you to export specific views of your map. If your project includes legends or interactive elements they will not be included for these types of exports. Use PNG to export a static image of your map. This format is useful if you want to add a snapshot to a word processor. PDF and SVG provide vector-based exports of your map, which are useful if you’re designing maps for printed material or need to make further edits to the design or layout. Both PDF and SVG output should contain very similar content but SVG is often supported by drawing programs natively (does not require conversion upon import). TileMill’s Mapnik XML export option is aimed at advanced users who are familiar with Mapnik, the software that TileMill uses under the hood to handles rendering your maps. TileMill uses CartoCSS to translate your CSS styles and layer definitions into the XML format that Mapnik can read each time you save your project. Most users will not need to directly use this underlying Mapnik XML, but it is easy to leverage if you want to move your raw map styles out of TileMill to set up for rendering directly with Mapnik, or other tools that work with Mapnik like TileStache and Invar. Note: If you export a Mapnik XML file into a TileMill project directory, this XML style will override all of the layers and stylesheets for that project. Any changes you make to the project in TileMill will not be visible until the XML file is moved. TileMill can be invoked from a terminal shell. This is useful for running exports on headless servers or scripting batch exports. To do this you’ll need to find and execute TileMill’s index.js file, the specifics of which will depend on your platform. For other Linux distribution or for custom-compiled TileMill installation, you’ll can to navigate to the directory where TileMill is installed and execute ./index.js export –help from there. To export an mbtiles file into ~/Documents/MapBox/export (the same folder the TileMill user interface will use) from the geography-class project for a restricted set of zoom levels do: To export a single png image from the geography-class project for a bounding box representing the USA do: By default Millstone outputs a lot of debugging information, but this can be disabled on the fly by doing: Source.