From OpenStreetMap Wiki
Jump to navigation Jump to search

Render two ways as one?

I have a short way that is one-way. Following that is a way that is two-way. Both ways have the same name. The one-way part is very short, not long enough to have its name rendered in it. Is there a way to have both ways rendered as one, only writing the name once?
RalfZ 19:09, 22 September 2006 (BST)

How to not render the name of a way?

Can I tag a way to not have the name rendered? Currently I am using the tag "svg:font-size:0". Is there a better way?
RalfZ 19:09, 22 September 2006 (BST)

Good question. Here's another way of doing it.
  1. Invent a new tag which means do not render the name for this way. You could use RalfZ:noName=1 for now, or propose one that can be more generally used at Proposed features.
  2. Modify the rules in your copy of osm-map-features.xml so that names are only rendered if a way does not have a RalfZ:noName tag. The modified rules would look like this (changes in red):
 <!-- Draw street names for all highways -->
 <rule e="segment|way" k="RalfZ:noName" v="~">
   <rule e="segment|way" k="highway" v="unclassified|residential">
     <text k="name" text-anchor='middle' startOffset='50%' class="highway-unclassified-name" />
     <text k="ref" class='highway-unclassified-ref' dx='2.5' dy='-2.5' />

   <rule e="way" k="highway" v="unsurfaced">
     <text k="name" text-anchor='middle' startOffset='50%' class="highway-unsurfaced-name" />
     <text k="ref" class='highway-unsurfaced-ref' dx='2.5' dy='-2.5' />
This rule tells Osmarender to select all elements that do not have a RalfZ:noName tag, then render names for those as normal. 80n 22:06, 22 September 2006 (BST)
Actually, there now is a tag that tells osmarender to not render the name of a way:
See osmarender page for details.
RalfZ 22:50, 26 October 2006 (BST)

svg: tags

  • You can adjust particular ways by adding tags to them in your map editor, e.g. add svg:font-size=0.5 to make a way's name appear smaller than others, or svg:fill=red to highlight the road by filling it with red rather than the default. Only do this in your local copy, do not upload these tags!
    Why should these tags not be uploaded to the server? 80n 21:32, 26 October 2006 (BST)