Posts

Showing posts with the label mapnik

TileDrawer: change bright style background color

Image
Bright style after changing the background color. More from my adventures in TileDrawer : the bright style comes with the wrong color for the map background (blue?), so I decided to replace it with a more sober shade of pale brown like most slippy maps seem to use. The change is a one liner: go to /usr/local/tiledrawer/gunicorn , edit the second line of style.xml and change the bgcolor attribute to whatever you like. I used rgb(241,238,232). Diff: Other TileDrawer posts .

Improving TileDrawer rendering speed

I have been playing with TileDrawer recently. After a first rapid successful test on a throw-away EC2 instance I decided to deploy one on a vm for intranet use. The installation process is pretty straightforward, just run the script copied from the TileDrawer page as root. FYI make sure you have installed curl and python-cssutils before launching the script. After the script completed I started browsing the map and noticed that tiles took a looong time to render. A look at top from the server console showed that postgres was hogging the cpu. Memory was fine with no signs of swapping (it is a 1GB instance which I promptly upgraded to 2, running on server class hardware with Xeon CPU). Even after the memory upgrade tile rendering was so slow that the browser would sometime give up and show a white tile. I decided to look into it a little further and started by using the technique I have already described in another article . The database cache looked fine though as mo...