mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-12 16:52:50 +00:00
Add feature filters for pistes and aerialways
This commit is contained in:
4
API.md
4
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.<br/>
|
||||
_Example:_ `disable_features=water,service_roads,points,paths,boundaries`<br/>
|
||||
_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.<br/>
|
||||
_Example:_ `gpx=https://tasks.hotosm.org/project/592/task/16.gpx`
|
||||
|
||||
@@ -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."
|
||||
|
||||
8
dist/locales/en.json
vendored
8
dist/locales/en.json
vendored
@@ -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."
|
||||
|
||||
@@ -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;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user