Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have installed Tilemill to export my map as mbtiles,and I used mbutil to export as PNG images & UTFGrid.So forth,I have a Tilemill project with MSS(Carto) files.Now the data source is going to change weekly and I wish to automate this action.

So does Tilemill support command-line scripting or something else to export my project with given properties ??

Current System : Windows 7 x64

EDIT in response to @Sunil:

TileMill doesn't have any features for automatically manipulating your Carto stylesheets, but you could use a bash script to manipulate the Carto files directly. TileMill also has an export command that can be called from bash.

On Mac OS X, you could run a command like this in the Terminal for more details about using the export command:

/Applications/ /Applications/ export --help

The exact command depends on how you installed TileMill

Unfortunately,same command for Mac OS X does not work on my current system.What does the last sentence mean,is there different installations of Tilemill ?

share|improve this question
helpful for you… – Sunil Feb 20 '13 at 9:46

I found it at last.Tilemill commands should run via node that included in the same directory with index.js file.I was trying to run directly index.js as index.js export .. which is not working.

@Sunil's redirection to support page allowed me to install ubuntu and see code was working then i realized that it was all working with nodejs functionality.After opening Tilemill GUI,it also works in http://localhost:20009/ as well.Then I got that commands should be working with node.

Therefore we must type on Windows 7 (x64)

node index.js export (..options..)

on Ubuntu

./index.js export (..options..)

Also I found all available commands


--format=[format] Export format (png|pdf|svg|mbtiles|upload|sync). (Default: undefined)
--bbox=[xmin,ymin,xmax,ymax] Comma separated coordinates of bounding box to export. (Default: undefined)
--minzoom=[zoom] MBTiles: minimum zoom level to export. (Default: undefined)
--maxzoom=[zoom] MBTiles: maximum zoom level to export. (Default: undefined)
--width=[width] Image: image width in pixels. (Default: 400)
--height=[height] Image: image height in pixels. (Default: 400)
--url=[url] URL to PUT updates to. (Default: undefined)
--log Write crash logs to destination directory. (Default: undefined)
--quiet Suppresses progress output. (Default: undefined)
--scheme=[scanline|pyramid|file] Enumeration scheme that defines the order in which tiles will be rendered. (Default: "scanline")
--job=[file] Store state in this file. If it exists, that job will be resumed. (Default: false)
--list=[file] Provide a list file for filescheme render. (Default: false)
--metatile=[num] Metatile size. (Default: undefined)
--scale=[num] Scale factor (Default: undefined)
--concurrency=[num] Number of exports that can be run concurrently. (Default: 4)
--files=[path] Path to files directory. (Default: "C:\Users\USERNAME/Documents/MapBox" on Windows) (Default: "/home/USERNAME/Documents/MapBox" on Ubuntu)
--syncAPI=[URL] MapBox API URL. (Default: "")
--syncURL=[URL] MapBox sync URL. (Default: "")
--syncAccount=[account] MapBox account name. (Default: "")
--syncAccessToken=[token] MapBox access token. (Default: "")
--verbose=on|off verbose logging (Default: "on")
--config=[path] Path to JSON configuration file

Best Regards

share|improve this answer
Thanks for sharing : ) – Sunil Feb 21 '13 at 8:15

Export command line options are officially documented at

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.