A Product of Mapbox
# Code

TileMill is an example of a fully javascript-based web application (both server/client side) that integrates with several external libraries including Mapnik and SQLite.

TileMill is released under a [BSD license](https://github.com/mapbox/tilemill/blob/master/LICENSE.md). Below are just some of the open source projects leveraged by TileMill:

- [Mapnik][mapnik] provides map rendering.
- [Carto](http://github.com/mapbox/carto) provides MSS-to-Mapnik XML map style compiling.
- [Tilelive](http://github.com/mapbox/tilelive.js) provides high-speed tile-rendering.
- [Node.js](http://www.nodejs.org) provides evented server-side javascript.
- [Express](http://github.com/visionmedia/express) provides a robust HTTP web server.
- [Backbone](http://github.com/documentcloud/backbone) provides an MVC framework for client-server AJAX.
- [Bones](http://github.com/developmentseed/bones) provides a framework for using Backbone on the client & server.
- [Modest Maps](http://github.com/stamen/modestmaps-js) provides a tile-based map UI.
- [CodeMirror](http://www.codemirror.net) provides "in-browser code editing made bearable."

For a full list of projects see [package.json](https://github.com/mapbox/tilemill/blob/master/package.json) in the TileMill repository.

## Building from source

### Mac OS X

Install the following dependencies first:

- [Xcode 3](https://connect.apple.com/cgi-bin/WebObjects/MemberSite.woa/wa/getSoftware?bundleID=20792) or [Xcode 4](http://itunes.apple.com/us/app/xcode/id448457090?mt=12)
- [Mapnik 2.0.0 r3057](http://trac.mapnik.org/wiki/Mapnik2) or higher
- [Node.js][node] 0.4.9 or greater
- [NPM][npm] 1.0.22 or greater

### Ubuntu Linux

Install TileMill dependencies:

    sudo apt-get install build-essential curl \
    libsqlite3-0 libsqlite3-dev libzip-dev libzip1

Add the mapnik2 nightly PPA and install mapnik2:

    sudo add-apt-repository ppa:mapnik/nightly-trunk
    sudo apt-get update
    sudo apt-get install libmapnik2 libmapnik2-dev mapnik2-utils

Add the node.js dev PPA and install node and npm:

    sudo add-apt-repository ppa:chris-lea/node.js
    sudo apt-get update
    sudo apt-get install nodejs nodejs-dev
    sudo curl http://npmjs.org/install.sh | sh

### Building TileMill

Run the following from a terminal to check out a development copy of TileMill and build it from source.

    git clone git@github.com:mapbox/tilemill.git
    cd tilemill
    npm install

Once the build is complete you can start TileMill with the following command from the `tilemill` directory:

    npm start

### Updating

To update your development copy of TileMill clean your copy and rebuild:

    # From the `tilemill` directory
    git pull
    rm -rf node_modules
    npm install

[mapnik]:http://www.mapnik.org
[xcode]:http://developer.apple.com/technologies/tools/xcode.html
[issues]:https://github.com/mapbox/tilemill/issues
[support]:http://support.mapbox.com/kb/tilemill/where-can-i-get-help-with-tilemill
[node]:https://github.com/joyent/node/wiki/Installation
[npm]:http://npmjs.org/