From 854eacdc7e05b91c1e17136e430830f36b3d3c28 Mon Sep 17 00:00:00 2001 From: Quincy Morgan Date: Wed, 22 May 2019 10:38:04 -0400 Subject: [PATCH] Add feature filters for pistes and aerialways --- API.md | 4 ++-- data/core.yaml | 6 ++++++ dist/locales/en.json | 8 ++++++++ modules/renderer/features.js | 13 ++++++++++++- 4 files changed, 28 insertions(+), 3 deletions(-) diff --git a/API.md b/API.md index c8c937a6f..01e5b0235 100644 --- a/API.md +++ b/API.md @@ -19,8 +19,8 @@ of iD (e.g. `http://preview.ideditor.com/release/`), the following parameters ar _Example:_ `comment=CAR%20crisis%2C%20refugee%20areas%20in%20Cameroon` * __`disable_features`__ - Disables features in the list.
_Example:_ `disable_features=water,service_roads,points,paths,boundaries`
- _Available features:_ `points` `traffic_roads` `service_roads` `paths` `buildings` `building_parts` `indoor` `landuse` - `boundaries` `water` `rail` `power` `past_future` `others` + _Available features:_ `points`, `traffic_roads`, `service_roads`, `paths`, `buildings`, `building_parts`, `indoor`, `landuse`, + `boundaries`, `water`, `rail`, `pistes`, `aerialways`, `power`, `past_future`, `others` * __`gpx`__ - A custom URL for loading a gpx track. Specifying a `gpx` parameter will automatically enable the gpx layer for display.
_Example:_ `gpx=https://tasks.hotosm.org/project/592/task/16.gpx` diff --git a/data/core.yaml b/data/core.yaml index 725dc16bf..7f2d9a393 100644 --- a/data/core.yaml +++ b/data/core.yaml @@ -646,6 +646,12 @@ en: rail: description: Rail Features tooltip: "Railways" + pistes: + description: Pistes + tooltip: "Ski Slopes, Sled Runs, Ice Skating Trails, etc." + aerialways: + description: Aerial Features + tooltip: "Chair Lifts, Gondolas, Zip Lines, etc." power: description: Power Features tooltip: "Power Lines, Power Plants, Substations, etc." diff --git a/dist/locales/en.json b/dist/locales/en.json index 01525a50d..dd4f2e4cf 100644 --- a/dist/locales/en.json +++ b/dist/locales/en.json @@ -806,6 +806,14 @@ "description": "Rail Features", "tooltip": "Railways" }, + "pistes": { + "description": "Pistes", + "tooltip": "Ski Slopes, Sled Runs, Ice Skating Trails, etc." + }, + "aerialways": { + "description": "Aerial Features", + "tooltip": "Chair Lifts, Gondolas, Zip Lines, etc." + }, "power": { "description": "Power Features", "tooltip": "Power Lines, Power Plants, Substations, etc." diff --git a/modules/renderer/features.js b/modules/renderer/features.js index 9102421d1..0004454c4 100644 --- a/modules/renderer/features.js +++ b/modules/renderer/features.js @@ -141,7 +141,8 @@ export function rendererFeatures(context) { !_rules.buildings.filter(tags) && !_rules.building_parts.filter(tags) && !_rules.indoor.filter(tags) && - !_rules.water.filter(tags); + !_rules.water.filter(tags) && + !_rules.pistes.filter(tags); }); defineRule('boundaries', function isBoundary(tags) { @@ -184,6 +185,16 @@ export function rendererFeatures(context) { ); }); + defineRule('pistes', function isPiste(tags) { + return tags['piste:type']; + }); + + defineRule('aerialways', function isPiste(tags) { + return tags.aerialway && + tags.aerialway !== 'yes' && + tags.aerialway !== 'station'; + }); + defineRule('power', function isPower(tags) { return !!tags.power; });