1

First, I'm new to TileMill, Ubuntu, and OpenStreetMap so I may be overlooking something basic.

I have a Postgres/PostGIS database with my OSM data. I created a new project in TileMill and added a layer for my OSM data in Postgres.

The query selects everything in planet_osm_line. When I click the Features icon in the Layers box, a grid is displayed with my linear features (roads, bike paths, transmission lines, etc.) To me, this indicates data is being returned from the database to TileMill. The next step is displaying it.

I'm trying to use the roads.mss style from https://github.com/gravitystorm/openstreetmap-carto but nothing is displayed.

When I simplify my styles to the following, the screen color changes but still no linework.

@water-color: #b5d0d0;
@land-color: #f2efe9;

Map {
  background-color: @water-color;
}

What am I missing?

1

Check out the CartoCSS documentation.

You're missing layer definitions for any layer except Map. The syntax is:

#layerName {
  propertyName: propertyValue;
}

So try something like:

#roads{
  line-color: #ccc;
  line-width: 1;
  line-join: round;
}

for each of your layers, being sure to match #layerName to the actual name of the layers in the layer panel (bottom left-most button).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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