Best practices for styling your tilemill stylesheet

(last updated July 2013)

  • Should I create separate layers for labels and then for the features (roadways, buildings, etc) themselves ?

Yes. If you’re intending to display text of any feature (like the name of a building or road), create a separate layer for them. You can name it as ‘labels’ or whatever you’d like. Labels are not yet automatically set to render on top of every other feature (<a href=”https://github.com/mapnik/mapnik/issues/87&gt;) layer so the text will not display as you intend in some instances (Dane Springmayer gave me a much more detailed explanation at State of the Map-US 2012).

Should each feature (roadways) have a separate layer ?
Do you have different layers for each zoom level ?

It’s common practice to have separate layers for highways based on different zoom levels.

Wnat data sources should I use ? Is there an advantage to use SHPs over PostGIS Databases ? GeoJSON instead of sqlite ?

 

I haven’t found any Tilemill stylesheets that extensively use layers from postgis besides osm-bright and am curious to see what others do.

  • Other Tips:

Remember to ask yourself at each particular zoom level, what do I specifically want to show at this zoom level ?
– (J. Lord – State of the Map, US 2012)

 

Debugging, or why is my code or Tilemill, not working ?!

– Normally, Tilemill will point out a specific error in your Carto if it’s not formatted correctly.

 

However,

 

If you want to see some carto in action, of howto write, manage your stylesheets, here’s a couple that I admire,

Osm-bright – Made by Mapbox.
Uses Postgis layers as their data sources;

Advertisements
Post a comment or leave a trackback: Trackback URL.

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