or Create a profile
04 Sep, 2011 01:16 PM
I have imported some OpenStreetMap data into PostGIS using
osm2pgsql. I have added that postgis layer as a layer to TileMill,
with the id #roads. I changed the carto style to include this
And it works and I can see some roads on the map. If I add in a
selector to that rule, e.g. I replace the above with this:
and I get no roads showing up. If try other values of 'highway',
e.g. primary, secondary, motorway, tertiary, unclassified, I see
nothing. I get the same results (nothing) if I use double quotes
(#roads[highway="roads"]). I enabled SQL query logging in
postgresql, and the query includes "highway" column. Running that
query in my own psql shell gives results with highway values. If I
explore the #roads layer in TileMill, I see features with
highway=trunk in the columns.
And yet, no roads show up. Is there something I'm forgetting to
do? How can I get the roads to show up?
2 Posted by Will White on 05 Sep, 2011 09:19 PM
I'm not able to reproduce this. This is the example project I
Can you zip up your project directory and attach it here?
3 Posted by Rory on 05 Sep, 2011 09:40 PM
OK, here's the contents of
This obviously doesn't include any PostgreSQL data, I dunno if
it'd be helpful to have a few rows, so you can see if there is
anything that catches your eye.
While investigating this I tried using some of the Open Streets
DC carto stylefiles. That file is still in the tarball, but
obviously not used.
4 Posted by Will White on 05 Sep, 2011 10:24 PM
Does it help if you remove the value from the "Unique Key Field" in
the layer form?
5 Posted by Rory on 05 Sep, 2011 10:35 PM
Yes! That solves it!
6 Posted by Will White on 05 Sep, 2011 10:39 PM
Ok, by removing that value, you may run into problems with any
MBTiles exports if you use tooltips.
This is a related issue:
7 Posted by Dane on 06 Sep, 2011 01:44 PM
This was a one liner bug upstream in mapnik, which is fixed now
in trunk: http://trac.mapnik.org/changeset/3274.
Thanks for this report Rory.
Dane closed this discussion
on 06 Sep, 2011 01:44 PM.
Comments are currently closed for this discussion.
You can start a new one.
3 people watching.
No more actions from MapBox or the discussion starter are required.
This discussion is private.
Only you and MapBox support staff can see and reply to it.
This discussion is public. Everyone can see and reply to it.
Powered by Tender™.