For a few projects I have to use Mapbox’s Tilemill so I can generate mbtile files. I just booted my Tilemill application for the first time on Yosemite, but it gets stuck and I get a never-ending preloader thingie. It seems that the app broke with the update to OSX Yosemite 10.10.
Luckily the solution ain’t that hard. Just build it yourself!
All you have to do is fork or clone the Mapbox Tilemill git repository and build the source code yourself.
Open Terminal (or your favourite Git repo application like Tower) and execute the following command to clone the repo.
git clone email@example.com:mapbox/tilemill.git
This will download the latest version of Tilemill.
Open Terminal and navigate to the location where you’ve cloned the repo and execute the following command.
You just have to create a shell script in the root of your Tilemill installation. I’ve called mine run.sh.
Add the following command to this file and save it.
#!/bin/bash echo 'Booting Tilemill node server' chmod a+x index.js ./index.js & echo 'Waiting for server to boot' & sleep 3 echo 'Opening browser' open '/Applications/Google Chrome.app' 'http://localhost:20009'
Navigate to your Tilemill directory in Terminal and type ./run.sh . The script will start the node server (line 2-4), then wait 3 seconds (that’s how long it took on my computer to start the server) and then open my Chrome browser and point to the node server where the Tilemill application is running.
But because I don’t like to be navigating all the time to my Tilemill installation directory in Terminal. I’ve added an alias for this command. Just add the following command in your .aliases, .bash_profile, or whatever file 🙂 Of course you’ll have to change the installation path of Tilemill.
alias tilemill='cd ~/PROJECTS/_libraries/js/tilemill && ./run.sh'
So now I can start my Tilemill application from everywhere in Terminal, by just typing tilemill. Hope this helps some of you guys out!