Technology Research Memo 3: TileMill

TYPE: Tile Renderer

AUTHOR: MapBox

LANGUAGE: CartoCSS

REFERENCE MAP SUPPORT: Tile Styling (1), Custom Tiling (1), Custom Vectors (1)

THEMATIC MAP ISOMORPHS: Choropleth (1), Dot density (2), Isoline/Surface (2), Flow (2), Cartogram (3), Bivariate (3)

CARTOGRAPHIC INTERACTIONS: Resymbolize (1), Overlay (1), Pan (1), Zoom (1), Filter (1), Search (1), Retrieve (1)

OTHER ISSUES:Mobile Support through MapBox iOS SDK

WEBSITE: http://mapbox.com/tilemill/

DOCUMENTATION: http://mapbox.com/tilemill/docs/

EXAMPLES: http://mapbox.com/maps/

WHAT IT IS

MapBox’s TileMill is a desktop application for styling and rendering raster tile sets for use in a slippy map. It integrates with MapBox’s fee-based tile hosting service. The application is free to download and fairly simple to set up.

When starting a new project, the application offers you a simple world continents basemap for reference to build on top of. Additional layers can be added from CSV, Shapefile, GeoJSON, KML, GeoTiff, SQLite, or PostGIS formats, or drawn from a URL pointing to a file (not a service). The program offers a built-in catalog of Natural Earth data to choose from as well.

Once a layer is imported, the program styles it using CSS stylesheets and a specialized library developed by MapBox, dubbed CartoCSS, which is pretty easy to get the hang of manipulating. Options for nesting and attaching styles allow for some artistry, once you figure out the order in which things are drawn. There is also a toolset for configuring a legend—as plain text or HTML—and map pop-ups, which can be applied to one layer only. The program has a built-in starter manual with instructions, and stronger documentation on the MapBox website, though the program seems to lack a direct link to it. It also has some quirky bugs and doesn’t always do what it’s supposed to. Hopefully these will be remedied in future releases.

When the map is styled how you want it, the Export menu gives options to save it as a single image file in PDF, PNG, or SVG format, or as tiles in Mapnik XML or MBTiles format. The “Upload” option sends it straight to a specified MapBox account. An interface allows you to set the center, extent, and zoom levels of tile sets. The output file size grows exponentially with an increase in the number of zoom levels, the zoom scale, and the extent. For some context, my first attempt at exporting a set of MBTiles bounding a mid-sized U.S. metropolitan area between zoom levels 10 and 17 (out of 22 possible) took three hours to output with my 4GB dual-core processor, with a final file size of 265 MB.

The MBTiles output is one tidy package that’s ready to serve. If you want to go all the way with MapBox, the tiles need to either be uploaded directly from TileMill to your account upon export, or uploaded as MBTiles from the “My account” section of the website. MapBox only gives away 60 MB of free space, though, and enough space to store my modest export costs $49 a month. Assuming you’re doing something very lightweight or money is no barrier, once you upload, your account settings have to be changed to “public” for others to view your map. The website provides cut-and-paste HTML for simple embedding, and the MapBox API documentation gives clues on how to structure a URL to access your map with JavaScript. Finally, if accessing the basemap with a JavaScript library or API, you’ll need to download and include the Wax library, which provides the necessary connecting script. Wax works with Leaflet, OpenLayers, Google, ESRI, Modest Maps, and Polymaps, and adds some map interface functionality of its own. But that’s the subject of a future technology research memo.

 

Advertisements

One response to “Technology Research Memo 3: TileMill

  1. Pingback: Web Mapping Services Overview (6/7) |

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s