diff --git a/changelog.md b/changelog.md index c74ee29..908b562 100644 --- a/changelog.md +++ b/changelog.md @@ -3,6 +3,7 @@ This page describes changes made [here](https://github.com/SomeoneElseOSM/Someon ## As yet unreleased Render pitch=line as a white line. +Render old_name on farmland if name is not set. ## 23/02/2022 Show flowerbeds as green. diff --git a/style.lua b/style.lua index 60ccb6d..5b9badf 100644 --- a/style.lua +++ b/style.lua @@ -363,6 +363,18 @@ function filter_tags_generic(keyvalues, nokeys) end end +-- ---------------------------------------------------------------------------- +-- Render old names on farmland etc. +-- ---------------------------------------------------------------------------- + if ((( keyvalues["landuse"] == "farmland" ) or + ( keyvalues["natural"] == "grassland" ) or + ( keyvalues["natural"] == "scrub" )) and + ( keyvalues["name"] == nil ) and + ( keyvalues["old_name"] ~= nil )) then + keyvalues["name"] = "(" .. keyvalues["old_name"] .. ")" + keyvalues["old_name"] = nil + end + -- ---------------------------------------------------------------------------- -- Rationalise the various trail_visibility values -- Also treat "overgrown=yes" as intermittent. A discussion on talk-gb was