NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

Does anyone know how to rotate text placed on the map? I'm labeling streets and would like have the name of the street run parallel with the street. Thanks!

asked 02 Apr '14, 17:23

dowdprop's gravatar image

dowdprop
11112
accept rate: 0%

edited 04 Apr '14, 14:19

stephan75's gravatar image

stephan75
12.6k556210

You mean that you render the map yourself ? which renderer ?

(02 Apr '14, 17:41) Pieren

I am new at this. I am potting text on my MapBox map using JOSM and Tilemill. When I add a "name" in JOSM it always adds it horizontal. I would like to rotate it so I can place some text at different angles. when I click on the text and press Shift +control, the curved arrows show up put I can't figure out how to rotate the text.

(02 Apr '14, 17:54) dowdprop
3

Could you explain exactly what you are doing, in particular to what exactly you are adding names? To the OSM database or to a local copy of the data?

In any case name/label placement is something that you control through the style sheet that controls the rendering process and nothing that you can add to OSM data.

(02 Apr '14, 19:01) SimonPoole ♦

Set the text-placement property equal to line. The property text-dy provides a pixel offset. For example:

#layer-id::labels {
  text-name: "[NAME]";
  text-face-name:'Norasi Oblique';
  text-fill:#bbb;
  text-size:15;
  text-placement: line; /* <-- this is the property you're looking for */
  text-dy: -8;
}

per https://www.mapbox.com/tilemill/docs/guides/styling-labels/

permanent link

answered 04 Apr '14, 20:07

eltiar's gravatar image

eltiar
261
accept rate: 0%

If you want to produce maps from raw OSM data via the Tilemill framework, try to find that feature in the documentation of tilemill.

If you cannot find anything there, try to ask the guys from Mapbox who develop tilemill.

Or you can have have a look at some other rendering programs like Maperitive ... maybe they have such a feature?

permanent link

answered 04 Apr '14, 14:23

stephan75's gravatar image

stephan75
12.6k556210
accept rate: 6%

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×36
×16
×12

question asked: 02 Apr '14, 17:23

question was seen: 5,892 times

last updated: 04 Apr '14, 20:07

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum