From 8637b23bbc658b6407a8a9179755fef9811ee28a Mon Sep 17 00:00:00 2001 From: Paul Norman Date: Mon, 13 Jul 2015 19:33:28 -0700 Subject: [PATCH 1/2] Avoid auto text-vertical-alignment for admin polygon labels auto involves a different method on Mapnik 3, so this allows consistency between 2.2 and 3.0 --- admin.mss | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/admin.mss b/admin.mss index ca3c975089..d586f74b9c 100644 --- a/admin.mss +++ b/admin.mss @@ -123,6 +123,8 @@ overlapping borders correctly. text-halo-radius: 1.0; text-halo-fill: rgba(255,255,255,0.6); text-placement: line; + text-clip: true; + text-vertical-alignment: middle; text-dy: -10; } @@ -133,6 +135,8 @@ overlapping borders correctly. text-halo-radius: 1.0; text-halo-fill: rgba(255,255,255,0.6); text-placement: line; + text-clip: true; + text-vertical-alignment: middle; text-dy: -10; } From ad818024eba03077f876eb545eda6623e7af3634 Mon Sep 17 00:00:00 2001 From: Paul Norman Date: Mon, 13 Jul 2015 20:31:17 -0700 Subject: [PATCH 2/2] Set text-vertical-alignment: middle for linear features Some labels have flipped to the other side of the lines, but this doesn't matter with the exception of cliffs, where there may be an issue. --- landcover.mss | 1 + roads.mss | 2 ++ water.mss | 1 + 3 files changed, 4 insertions(+) diff --git a/landcover.mss b/landcover.mss index 539a91683b..2eaae739d9 100644 --- a/landcover.mss +++ b/landcover.mss @@ -661,6 +661,7 @@ text-face-name: @book-fonts; text-placement: line; text-dy: 8; + text-vertical-alignment: middle; text-spacing: 400; } } diff --git a/roads.mss b/roads.mss index 7a85d845df..5007adfc65 100644 --- a/roads.mss +++ b/roads.mss @@ -2429,6 +2429,7 @@ residential is rendered from z10 and is not included in osm_planet_roads. */ text-clip: false; text-placement: line; text-face-name: @book-fonts; + text-vertical-alignment: middle; text-dy: 5; } [zoom >= 16] { @@ -2456,6 +2457,7 @@ residential is rendered from z10 and is not included in osm_planet_roads. */ text-clip: false; text-placement: line; text-face-name: @book-fonts; + text-vertical-alignment: middle; text-dy: 7; } [zoom >= 17] { diff --git a/water.mss b/water.mss index 6ee9df2870..f96f5f1386 100644 --- a/water.mss +++ b/water.mss @@ -264,6 +264,7 @@ text-halo-fill: rgba(255,255,255,0.6); text-spacing: 600; text-placement: line; + text-vertical-alignment: middle; text-dy: 8; }