From de6d4977530017e01b218479d72bee9cb5522f15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Fri, 8 Feb 2019 07:46:03 +0100 Subject: [PATCH] places: improve (unfin) --- places.json | 44 +++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 41 insertions(+), 3 deletions(-) diff --git a/places.json b/places.json index 29d554b..84c4e2a 100644 --- a/places.json +++ b/places.json @@ -24,23 +24,61 @@ "4": "node[place~'^(continent|country)$']", "6": "node[place~'^(country|city)$']", "8": "node[place~'^(country|city|state)$']", + "9": "node[place~'^(country|city|state|town)$']", "11": "node[place~'^(city|state|region|town|village)$']", + "12": "node[place~'^(city|state|region|town|village|suburb)$']", "13": "node[place~'^(city|state|region|town|village|suburb|hamlet|quarter)$']", "15": "node[place~'^(city|region|town|village|suburb|hamlet|quarter)$']", "16": "(node[place~'^(region|town|village|suburb|hamlet|quarter|islet|isolated_dwelling|neighbourhood|farm)$'];way[place~'^(isolated_dwelling|neighbourhood|farm)$'];relation[place~'^(isolated_dwelling|neighbourhood|farm)$'];);" }, "feature": { + "styles": "", + "pre": "{% if tags.place in const[map.zoom] %}{% set style = const[map.zoom][tags.place] %}{% else %}{% set style = const[map.zoom]['*'] %}{% endif %}", "title": "{% set loc_name = localizedTag(tags, 'name') %}{{ loc_name }}{% if loc_name != tags.name %} ({{ tags.name }}){% endif %}", "description": "{{ tagTrans('place', tags.place) }}", "body": "{% if tags.population %}{{ keyTrans('population') }}: {{ tags.population }}{% endif %}", - "priority": "{% set priorities = { 'continent': 0, 'country': 1, 'state': 2, 'region': 3, 'city': 4, 'town': 5, 'village': 6, 'suburb': 7, 'hamlet': 8, 'quarter': 9, neighbourhood: 10, 'isolated_dwelling': 11, 'farm': 12 } %}{{ priorities[tags.place] }}" + "priority": "{% set priorities = { 'continent': 0, 'country': 1, 'state': 2, 'region': 3, 'city': 4, 'town': 5, 'village': 6, 'suburb': 7, 'hamlet': 8, 'quarter': 9, neighbourhood: 10, 'isolated_dwelling': 11, 'farm': 12 } %}{{ priorities[tags.place] }}", + "markerSymbol": "", + "markerSign": "{{ localizedTag(tags, 'name') }}", + "listMarkerSymbol": "", + "listMarkerSign": "*" }, + "const": { + "0": { "continent": "font-weight: bold;" }, + "1": { "continent": "font-weight: bold;" }, + "2": { "continent": "font-weight: bold;" }, + "3": { "continent": "font-weight: bold;" }, + "4": { "continent": "font-weight: bold;", "country": "font-size: 8pt; font-weight: bold;" }, + "5": { "continent": "font-weight: bold;", "country": "font-size: 8pt; font-weight: bold;" }, + "6": { "country": "font-weight: bold;", "city": "font-size: 8pt" }, + "7": { "country": "font-weight: bold;", "city": "font-size: 8pt" }, + "8": { "country": "font-weight: bold;", "city": "font-size: 9pt", "state": "font-size: 8pt; font-weight: bold;" }, + "9": { "country": "font-weight: bold;", "city": "font-size: 9pt", "state": "font-size: 8pt; font-weight: bold;", "town": "font-size: 6pt;" }, + "10": { "country": "font-weight: bold;", "city": "font-size: 8pt", "state": "font-size: 9pt; font-weight: bold;", "town": "font-size: 7pt;" }, + "11": { "city": "", "state": "font-weight: bold;", "region": "font-weight: bold; font-size: 8pt;", "town": "font-size: 8pt;", "village": "font-size: 6pt;" }, + "12": { "city": "", "state": "font-weight: bold;", "region": "font-weight: bold; font-size: 9pt;", "town": "font-size: 9pt;", "village": "font-size: 7pt;", "suburb": "font-size: 6pt;" }, + "13": { "city": "", "state": "font-weight: bold;", "region": "font-weight: bold;", "town": "font-size: 10pt;", "village": "font-size: 8pt;", "suburb": "font-size: 7pt;", "hamlet": "font-size: 6pt;", "quarter": "font-weight: bold; font-size: 6pt;" }, + "14": { "city": "", "state": "font-weight: bold;", "region": "font-weight: bold;", "town": "font-size: 10pt;", "village": "font-size: 8pt;", "suburb": "font-size: 7pt;", "hamlet": "font-size: 6pt;", "quarter": "font-weight: bold; font-size: 6pt;" }, + "15": { "city": "", "region": "font-weight: bold;", "town": "font-size: 10pt;", "village": "font-size: 9pt;", "suburb": "font-size: 8pt;", "hamlet": "font-size: 7pt;", "quarter": "font-weight: bold; font-size: 7pt;" }, + "16": { "region": "font-weight: bold;", "town": "font-size: 10pt;", "village": "font-size: 9pt;", "suburb": "font-size: 8pt;", "hamlet": "font-size: 7pt;", "quarter": "font-weight: bold; font-size: 7pt;", "*": "font-size: 6pt;" }, + "17": { "region": "font-weight: bold;", "town": "font-size: 10pt;", "village": "font-size: 9pt;", "suburb": "font-size: 8pt;", "hamlet": "font-size: 7pt;", "quarter": "font-weight: bold; font-size: 7pt;", "*": "font-size: 6pt;" }, + "18": { "region": "font-weight: bold;", "town": "font-size: 10pt;", "village": "font-size: 9pt;", "suburb": "font-size: 8pt;", "hamlet": "font-size: 7pt;", "quarter": "font-weight: bold; font-size: 7pt;", "*": "font-size: 6pt;" }, + "19": { "region": "font-weight: bold;", "town": "font-size: 10pt;", "village": "font-size: 9pt;", "suburb": "font-size: 8pt;", "hamlet": "font-size: 7pt;", "quarter": "font-weight: bold; font-size: 7pt;", "*": "font-size: 6pt;" }, + "20": { "region": "font-weight: bold;", "town": "font-size: 10pt;", "village": "font-size: 9pt;", "suburb": "font-size: 8pt;", "hamlet": "font-size: 7pt;", "quarter": "font-weight: bold; font-size: 7pt;", "*": "font-size: 6pt;" } + }, + "info": [ + "" + ], "filter": { "name": { - "key": [ "name", "name:*" ], + "key": [ "name", "name:*", "official_name", "official_name:*", "alt_name", "alt_name:*" ], + "show_default": "true", "name": "{{ keyTrans('name') }}", "type": "text", - "change_on": "keyup", "op": "strsearch" } }