3

I'm learning to use Tilemill to map Toronto OSM street data. I've added osm2psql data from http://metro.teczno.com/#toronto. When turning on road labels for the line file, I find that I'm getting results much too frequently. Is there a way to control the frequency or distance between labels?

2

Use text-spacing and text-min-distance (when one doesn't work, another would).

Also you may find labels are drawn too ferquently not because those settings are too low, but because labels are drawn for every segment of the road. I doubt there is a solution for Shape files, but in PostGIS (see this tutorial) you can preprocess your label layer with select ST_LineMerge(ST_Union(way)) as way, name from ... where ... group by name.

  • Hey @IIja - this seems like it may be the answer, I'll try it this evening. I've tried text-min-distance with minimal success...thanks. – TheNally May 23 '14 at 16:49
  • You're right - the frequent names are due to each segment and 'lane' on a highway (for example) having a label. The text-min-distance helps this, as well as replacing labels like 'highway NW' and 'highway SW' by just 'highway'. Thanks. – TheNally May 30 '14 at 20:37

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.