From 041e05ec904a2419ed719a9655950659575075b4 Mon Sep 17 00:00:00 2001 From: Quincy Morgan Date: Wed, 13 Feb 2019 12:01:40 -0500 Subject: [PATCH 1/9] Make the line component of the line preset icons dynamic and match the line styling in the map --- css/30_highways.css | 70 +++++++++---------- css/50_misc.css | 2 +- css/80_app.css | 21 ++++++ data/presets/presets.json | 38 +++++----- data/presets/presets/highway/bridleway.json | 2 +- .../presets/presets/highway/bus_guideway.json | 2 +- .../presets/presets/highway/construction.json | 2 +- data/presets/presets/highway/corridor.json | 2 +- data/presets/presets/highway/cycleway.json | 2 +- data/presets/presets/highway/footway.json | 2 +- .../highway/footway/_zebra-raised.json | 2 +- .../presets/highway/footway/_zebra.json | 2 +- .../presets/highway/footway/conveying.json | 2 +- .../highway/footway/marked-raised.json | 2 +- .../presets/highway/footway/marked.json | 2 +- .../presets/highway/footway/sidewalk.json | 2 +- .../presets/highway/pedestrian_line.json | 2 +- data/presets/presets/man_made/pier.json | 2 +- data/presets/presets/railway/light_rail.json | 2 +- data/presets/presets/railway/monorail.json | 2 +- data/presets/presets/railway/subway.json | 2 +- data/presets/presets/railway/tram.json | 2 +- data/presets/presets/route/ferry.json | 6 +- data/taginfo.json | 30 ++++---- modules/ui/preset_icon.js | 38 ++++++++-- svg/iD-sprite/presets/ferry-line.svg | 9 --- svg/iD-sprite/presets/highway-bridleway.svg | 9 --- .../presets/highway-bus-guideway.svg | 13 ---- .../presets/highway-construction.svg | 9 --- svg/iD-sprite/presets/highway-cycleway.svg | 9 --- svg/iD-sprite/presets/highway-footway.svg | 9 --- .../presets/highway-living-street.svg | 10 +-- .../presets/highway-motorway-link.svg | 16 +---- svg/iD-sprite/presets/highway-motorway.svg | 10 +-- svg/iD-sprite/presets/highway-path.svg | 8 +-- .../presets/highway-primary-link.svg | 16 +---- svg/iD-sprite/presets/highway-primary.svg | 10 +-- svg/iD-sprite/presets/highway-residential.svg | 10 +-- svg/iD-sprite/presets/highway-road.svg | 10 +-- .../presets/highway-secondary-link.svg | 16 +---- svg/iD-sprite/presets/highway-secondary.svg | 10 +-- svg/iD-sprite/presets/highway-service.svg | 10 +-- svg/iD-sprite/presets/highway-steps.svg | 8 +-- .../presets/highway-tertiary-link.svg | 16 +---- svg/iD-sprite/presets/highway-tertiary.svg | 10 +-- svg/iD-sprite/presets/highway-track.svg | 11 +-- svg/iD-sprite/presets/highway-trunk-link.svg | 16 +---- svg/iD-sprite/presets/highway-trunk.svg | 10 +-- .../presets/highway-unclassified.svg | 10 +-- svg/iD-sprite/presets/other-line.svg | 8 +-- svg/iD-sprite/presets/pipeline-line.svg | 7 +- svg/iD-sprite/presets/piste-line.svg | 9 --- svg/iD-sprite/presets/power-line.svg | 7 +- svg/iD-sprite/presets/railway-abandoned.svg | 8 +-- svg/iD-sprite/presets/railway-disused.svg | 8 +-- svg/iD-sprite/presets/railway-light-rail.svg | 13 ---- svg/iD-sprite/presets/railway-monorail.svg | 10 --- svg/iD-sprite/presets/railway-rail.svg | 8 +-- svg/iD-sprite/presets/railway-subway.svg | 13 ---- svg/iD-sprite/presets/railway-tram.svg | 14 ---- svg/iD-sprite/presets/waterway-canal.svg | 8 +-- svg/iD-sprite/presets/waterway-ditch.svg | 7 +- svg/iD-sprite/presets/waterway-river.svg | 7 +- svg/iD-sprite/presets/waterway-stream.svg | 7 +- 64 files changed, 201 insertions(+), 439 deletions(-) delete mode 100644 svg/iD-sprite/presets/ferry-line.svg delete mode 100644 svg/iD-sprite/presets/highway-bridleway.svg delete mode 100644 svg/iD-sprite/presets/highway-bus-guideway.svg delete mode 100644 svg/iD-sprite/presets/highway-construction.svg delete mode 100644 svg/iD-sprite/presets/highway-cycleway.svg delete mode 100644 svg/iD-sprite/presets/highway-footway.svg delete mode 100644 svg/iD-sprite/presets/piste-line.svg delete mode 100644 svg/iD-sprite/presets/railway-light-rail.svg delete mode 100644 svg/iD-sprite/presets/railway-monorail.svg delete mode 100644 svg/iD-sprite/presets/railway-subway.svg delete mode 100644 svg/iD-sprite/presets/railway-tram.svg diff --git a/css/30_highways.css b/css/30_highways.css index d1f2e90c4..4da6d1030 100644 --- a/css/30_highways.css +++ b/css/30_highways.css @@ -32,8 +32,8 @@ path.line.stroke.tag-highway { stroke-width: 5; } -.preset-icon .icon.iD-highway-motorway, -.preset-icon .icon.iD-highway-motorway-link { +.preset-icon .icon.tag-highway-motorway, +.preset-icon .icon.tag-highway-motorway-link { color: #CF2081; fill: #70372f; } @@ -48,8 +48,8 @@ path.line.casing.tag-motorway { stroke: #70372f; } -.preset-icon .icon.iD-highway-trunk, -.preset-icon .icon.iD-highway-trunk-link { +.preset-icon .icon.tag-highway-trunk, +.preset-icon .icon.tag-highway-trunk-link { color: #DD2F22; fill: #70372f; } @@ -64,8 +64,8 @@ path.line.casing.tag-trunk { stroke: #70372f; } -.preset-icon .icon.iD-highway-primary, -.preset-icon .icon.iD-highway-primary-link { +.preset-icon .icon.tag-highway-primary, +.preset-icon .icon.tag-highway-primary-link { color: #F99806; fill: #70372f; } @@ -80,8 +80,8 @@ path.line.casing.tag-primary { stroke: #70372f; } -.preset-icon .icon.iD-highway-secondary, -.preset-icon .icon.iD-highway-secondary-link { +.preset-icon .icon.tag-highway-secondary, +.preset-icon .icon.tag-highway-secondary-link { color: #F3F312; fill: #70372f; } @@ -96,8 +96,8 @@ path.line.casing.tag-secondary { stroke: #70372f; } -.preset-icon .icon.iD-highway-tertiary, -.preset-icon .icon.iD-highway-tertiary-link { +.preset-icon .icon.tag-highway-tertiary, +.preset-icon .icon.tag-highway-tertiary-link { color: #FFF9B3; fill: #70372f; } @@ -112,8 +112,8 @@ path.line.casing.tag-tertiary { stroke: #70372f; } -.legacy-carto .preset-icon .icon.iD-highway-motorway, -.legacy-carto .preset-icon .icon.iD-highway-motorway-link { +.legacy-carto .preset-icon .icon.tag-highway-motorway, +.legacy-carto .preset-icon .icon.tag-highway-motorway-link { color: #58a9ed; fill: #2c5476; } @@ -128,8 +128,8 @@ path.line.casing.tag-tertiary { stroke: #2c5476; } -.legacy-carto .preset-icon .icon.iD-highway-trunk, -.legacy-carto .preset-icon .icon.iD-highway-trunk-link { +.legacy-carto .preset-icon .icon.tag-highway-trunk, +.legacy-carto .preset-icon .icon.tag-highway-trunk-link { color: #8cd05f; fill: #46682f; } @@ -144,8 +144,8 @@ path.line.casing.tag-tertiary { stroke: #46682f; } -.legacy-carto .preset-icon .icon.iD-highway-primary, -.legacy-carto .preset-icon .icon.iD-highway-primary-link { +.legacy-carto .preset-icon .icon.tag-highway-primary, +.legacy-carto .preset-icon .icon.tag-highway-primary-link { color: #e06d5f; fill: #70372f; } @@ -160,8 +160,8 @@ path.line.casing.tag-tertiary { stroke: #70372f; } -.legacy-carto .preset-icon .icon.iD-highway-secondary, -.legacy-carto .preset-icon .icon.iD-highway-secondary-link { +.legacy-carto .preset-icon .icon.tag-highway-secondary, +.legacy-carto .preset-icon .icon.tag-highway-secondary-link { color: #eab056; fill: #75582b; } @@ -176,8 +176,8 @@ path.line.casing.tag-tertiary { stroke: #75582b; } -.legacy-carto .preset-icon .icon.iD-highway-tertiary, -.legacy-carto .preset-icon .icon.iD-highway-tertiary-link { +.legacy-carto .preset-icon .icon.tag-highway-tertiary, +.legacy-carto .preset-icon .icon.tag-highway-tertiary-link { color: #ffff7e; fill: #7f7f3f; } @@ -192,7 +192,7 @@ path.line.casing.tag-tertiary { stroke: #7f7f3f; } -.preset-icon .icon.iD-highway-residential { +.preset-icon .icon.tag-highway-residential { color: #fff; fill: #444; } @@ -205,7 +205,7 @@ path.line.casing.tag-residential { stroke: #444; } -.preset-icon .icon.iD-highway-unclassified { +.preset-icon .icon.tag-highway-unclassified { color: #dca; fill: #444; } @@ -387,7 +387,7 @@ path.line.stroke.tag-steps { } -.preset-icon .icon.iD-highway-living-street { +.preset-icon .icon.tag-highway-living-street { color: #bbb; fill: #ddd; } @@ -400,8 +400,8 @@ path.line.casing.tag-living_street { stroke: #fff; } -.preset-icon .icon.iD-highway-footway.tag-highway-corridor, -.preset-icon .icon.iD-highway-footway.tag-highway-pedestrian { +.preset-icon .icon.tag-highway-corridor, +.preset-icon .icon.tag-highway-pedestrian { color: #8cd05f; fill: #fff; } @@ -431,7 +431,7 @@ path.line.casing.tag-pedestrian.tag-unpaved { stroke-dasharray: none; } -.preset-icon .icon.iD-highway-road { +.preset-icon .icon.tag-highway-road { color: #9e9e9e; fill: #666; } @@ -444,7 +444,7 @@ path.line.casing.tag-road { stroke: #666; } -.preset-icon .icon.iD-highway-service { +.preset-icon .icon.tag-highway-service { color: #fff; fill: #666; } @@ -459,8 +459,8 @@ path.line.casing.tag-service { /* special service roads and bus guideways */ /* with `service=* tag` (e.g. parking_aisle, alley, drive-through) */ -.preset-icon .icon.iD-highway-bus_guideway, -.preset-icon .icon.iD-highway-service.tag-service { +.preset-icon .icon.tag-highway-bus_guideway, +.preset-icon .icon.tag-highway-service.tag-service { color: #dca; fill: #666; } @@ -475,7 +475,7 @@ path.line.casing.tag-service.tag-service { stroke: #666; } -.preset-icon .icon.iD-highway-track { +.preset-icon .icon.tag-highway-track { color: #eaeaea; fill: #c5b59f; } @@ -521,7 +521,7 @@ path.line.casing.tag-highway-bridleway.tag-unpaved { } .preset-icon .icon.iD-category-path, -.preset-icon .icon.iD-highway-path { +.preset-icon .icon.tag-highway-path { color: #988; fill: #dca; } @@ -531,7 +531,7 @@ path.line.stroke.tag-highway-path { .preset-icon .icon.tag-route-foot, .preset-icon .icon.tag-route-hiking, -.preset-icon .icon.iD-highway-footway { +.preset-icon .icon.tag-highway-footway { color: #988; fill: #fff; } @@ -541,7 +541,7 @@ path.line.stroke.tag-highway-footway { .preset-icon .icon.tag-route-bicycle, -.preset-icon .icon.iD-highway-cycleway { +.preset-icon .icon.tag-highway-cycleway { color: #58a9ed; fill: #fff; } @@ -550,7 +550,7 @@ path.line.stroke.tag-highway-cycleway { } .preset-icon .icon.tag-route-horse, -.preset-icon .icon.iD-highway-bridleway { +.preset-icon .icon.tag-highway-bridleway { color: #e06d5f; fill: #fff; } @@ -558,7 +558,7 @@ path.line.stroke.tag-highway-bridleway { stroke: #e06d5f; } -.preset-icon .icon.iD-highway-steps { +.preset-icon .icon.tag-highway-steps { color: #81d25c; fill: #fff; } diff --git a/css/50_misc.css b/css/50_misc.css index f7ac406be..8c8ad1c3b 100644 --- a/css/50_misc.css +++ b/css/50_misc.css @@ -352,7 +352,7 @@ path.line.casing.tag-status { } /* Road Closed Status */ -.preset-icon .icon.iD-highway-construction { +.preset-icon .icon.tag-highway-construction { color: #fc6c14; fill: #fff; } diff --git a/css/80_app.css b/css/80_app.css index 674b6e9a4..a084a399d 100644 --- a/css/80_app.css +++ b/css/80_app.css @@ -948,6 +948,21 @@ a.hide-toggle { background: #ececec; } +.preset-icon-line { + margin: auto; + position: absolute; + left: 10px; + top: 30px; +} + +/* use a consistent stroke width */ +.preset-icon-line path.line.stroke { + stroke-width: 2 !important; +} +.preset-icon-line path.line.casing { + stroke-width: 4 !important; +} + .preset-icon-fill-area { cursor: inherit; height: 40px; @@ -1011,6 +1026,9 @@ a.hide-toggle { left: 8px; margin: auto; } +.preset-icon-44.line-geom { + top: 2px; +} .preset-icon-44 .icon { width: 44px; @@ -1035,6 +1053,9 @@ a.hide-toggle { left: 18px; margin: auto; } +.preset-icon-24.line-geom { + top: 12px; +} .preset-icon-24 .icon { width: 24px; diff --git a/data/presets/presets.json b/data/presets/presets.json index 0aa3805a3..41f4811a2 100644 --- a/data/presets/presets.json +++ b/data/presets/presets.json @@ -403,25 +403,25 @@ "healthcare/rehabilitation": {"icon": "maki-hospital", "geometry": ["point", "area"], "terms": ["rehab", "therapist", "therapy"], "tags": {"healthcare": "rehabilitation"}, "name": "Rehabilitation Facility"}, "healthcare/speech_therapist": {"icon": "maki-hospital", "geometry": ["point", "area"], "terms": ["speech", "therapist", "therapy", "voice"], "tags": {"healthcare": "speech_therapist"}, "name": "Speech Therapist"}, "highway/bus_stop": {"icon": "maki-bus", "fields": ["name", "network", "operator", "bench", "shelter"], "geometry": ["point", "vertex"], "tags": {"highway": "bus_stop"}, "name": "Bus Stop / Platform", "searchable": false}, - "highway/bridleway": {"fields": ["name", "surface", "width", "structure", "access", "incline", "horse_scale"], "moreFields": ["wheelchair", "lit", "smoothness", "covered", "dog"], "icon": "iD-highway-bridleway", "geometry": ["line"], "tags": {"highway": "bridleway"}, "terms": ["bridleway", "equestrian", "horse", "trail"], "name": "Bridle Path"}, - "highway/bus_guideway": {"icon": "iD-highway-bus-guideway", "fields": ["name", "operator", "oneway", "structure", "covered"], "geometry": ["line"], "tags": {"highway": "bus_guideway"}, "addTags": {"highway": "bus_guideway", "access": "no", "bus": "designated"}, "removeTags": {"highway": "bus_guideway", "access": "no", "bus": "designated"}, "terms": [], "name": "Bus Guideway"}, - "highway/construction": {"icon": "iD-highway-construction", "fields": ["name", "opening_date", "check_date", "note", "oneway", "structure", "access"], "geometry": ["line"], "tags": {"highway": "construction", "access": "no"}, "terms": ["closed", "closure", "construction"], "name": "Road Closed"}, - "highway/corridor": {"icon": "iD-highway-footway", "fields": ["name", "width", "level", "access_simple", "wheelchair"], "moreFields": ["maxheight"], "geometry": ["line"], "tags": {"highway": "corridor"}, "terms": ["gallery", "hall", "hallway", "indoor", "passage", "passageway"], "name": "Indoor Corridor"}, + "highway/bridleway": {"fields": ["name", "surface", "width", "structure", "access", "incline", "horse_scale"], "moreFields": ["wheelchair", "lit", "smoothness", "covered", "dog"], "icon": "maki-horse-riding", "geometry": ["line"], "tags": {"highway": "bridleway"}, "terms": ["bridleway", "equestrian", "horse", "trail"], "name": "Bridle Path"}, + "highway/bus_guideway": {"icon": "maki-bus", "fields": ["name", "operator", "oneway", "structure", "covered"], "geometry": ["line"], "tags": {"highway": "bus_guideway"}, "addTags": {"highway": "bus_guideway", "access": "no", "bus": "designated"}, "removeTags": {"highway": "bus_guideway", "access": "no", "bus": "designated"}, "terms": [], "name": "Bus Guideway"}, + "highway/construction": {"icon": "maki-barrier", "fields": ["name", "opening_date", "check_date", "note", "oneway", "structure", "access"], "geometry": ["line"], "tags": {"highway": "construction", "access": "no"}, "terms": ["closed", "closure", "construction"], "name": "Road Closed"}, + "highway/corridor": {"icon": "temaki-pedestrian", "fields": ["name", "width", "level", "access_simple", "wheelchair"], "moreFields": ["maxheight"], "geometry": ["line"], "tags": {"highway": "corridor"}, "terms": ["gallery", "hall", "hallway", "indoor", "passage", "passageway"], "name": "Indoor Corridor"}, "highway/crossing/zebra-raised": {"icon": "temaki-pedestrian", "fields": ["crossing", "kerb", "tactile_paving"], "geometry": ["vertex"], "tags": {"highway": "crossing", "crossing": "zebra", "traffic_calming": "table"}, "reference": {"key": "traffic_calming", "value": "table"}, "terms": ["zebra crossing", "marked crossing", "crosswalk", "flat top", "hump", "speed", "slow"], "name": "Marked Crosswalk (Raised)", "searchable": false}, "highway/crossing/zebra": {"icon": "temaki-pedestrian", "fields": ["crossing", "kerb", "tactile_paving"], "geometry": ["vertex"], "tags": {"highway": "crossing", "crossing": "zebra"}, "reference": {"key": "highway", "value": "crossing"}, "terms": ["zebra crossing", "marked crossing", "crosswalk"], "name": "Marked Crosswalk", "searchable": false}, "highway/crossing/marked-raised": {"icon": "temaki-pedestrian", "fields": ["crossing", "kerb", "tactile_paving"], "geometry": ["vertex"], "tags": {"highway": "crossing", "crossing": "marked", "traffic_calming": "table"}, "reference": {"key": "traffic_calming", "value": "table"}, "terms": ["zebra crossing", "marked crossing", "crosswalk", "flat top", "hump", "speed", "slow"], "name": "Marked Crosswalk (Raised)"}, "highway/crossing/marked": {"icon": "temaki-pedestrian", "fields": ["crossing", "kerb", "tactile_paving"], "geometry": ["vertex"], "tags": {"highway": "crossing", "crossing": "marked"}, "reference": {"key": "highway", "value": "crossing"}, "terms": ["zebra crossing", "marked crossing", "crosswalk"], "name": "Marked Crosswalk"}, "highway/crossing/unmarked-raised": {"fields": ["crossing", "kerb", "tactile_paving"], "geometry": ["vertex"], "addTags": {"highway": "crossing", "crossing": "unmarked", "traffic_calming": "table"}, "removeTags": {"highway": "crossing", "crossing": "unmarked", "traffic_calming": "table"}, "tags": {"highway": "crossing", "traffic_calming": "table"}, "reference": {"key": "traffic_calming", "value": "table"}, "terms": ["flat top", "hump", "speed", "slow"], "name": "Unmarked Crossing (Raised)"}, "highway/crossing/unmarked": {"fields": ["crossing", "kerb", "tactile_paving"], "geometry": ["vertex"], "addTags": {"highway": "crossing", "crossing": "unmarked"}, "removeTags": {"highway": "crossing", "crossing": "unmarked"}, "tags": {"highway": "crossing"}, "reference": {"key": "highway", "value": "crossing"}, "terms": [], "name": "Unmarked Crossing"}, - "highway/cycleway": {"icon": "iD-highway-cycleway", "fields": ["name", "oneway", "surface", "width", "structure", "access", "incline"], "moreFields": ["wheelchair", "lit", "smoothness", "maxspeed", "covered", "dog"], "geometry": ["line"], "tags": {"highway": "cycleway"}, "terms": ["bike"], "name": "Cycle Path"}, + "highway/cycleway": {"icon": "maki-bicycle", "fields": ["name", "oneway", "surface", "width", "structure", "access", "incline"], "moreFields": ["wheelchair", "lit", "smoothness", "maxspeed", "covered", "dog"], "geometry": ["line"], "tags": {"highway": "cycleway"}, "terms": ["bike"], "name": "Cycle Path"}, "highway/elevator": {"icon": "temaki-elevator", "fields": ["access_simple", "opening_hours", "maxweight", "ref", "wheelchair"], "moreFields": ["maxheight"], "geometry": ["vertex"], "tags": {"highway": "elevator"}, "terms": ["lift"], "name": "Elevator"}, - "highway/footway": {"icon": "iD-highway-footway", "fields": ["name", "surface", "width", "structure", "access", "incline"], "moreFields": ["wheelchair", "lit", "smoothness", "covered", "dog"], "geometry": ["line"], "terms": ["hike", "hiking", "trackway", "trail", "walk"], "tags": {"highway": "footway"}, "name": "Foot Path"}, - "highway/footway/zebra-raised": {"icon": "iD-highway-footway", "fields": ["crossing", "access", "surface", "kerb", "tactile_paving"], "geometry": ["line"], "tags": {"highway": "footway", "footway": "crossing", "crossing": "zebra", "traffic_calming": "table"}, "reference": {"key": "traffic_calming", "value": "table"}, "terms": ["zebra crossing", "marked crossing", "crosswalk", "flat top", "hump", "speed", "slow"], "name": "Marked Crosswalk (Raised)", "searchable": false}, - "highway/footway/zebra": {"icon": "iD-highway-footway", "fields": ["crossing", "access", "surface", "kerb", "tactile_paving"], "geometry": ["line"], "tags": {"highway": "footway", "footway": "crossing", "crossing": "zebra"}, "reference": {"key": "footway", "value": "crossing"}, "terms": ["zebra crossing", "marked crossing", "crosswalk"], "name": "Marked Crosswalk", "searchable": false}, - "highway/footway/conveying": {"icon": "iD-highway-footway", "fields": ["name", "conveying", "access_simple", "lit", "width", "wheelchair"], "geometry": ["line"], "terms": ["moving sidewalk", "autwalk", "skywalk", "travolator", "travelator", "travellator", "conveyor"], "tags": {"highway": "footway", "conveying": "*"}, "name": "Moving Walkway"}, - "highway/footway/marked-raised": {"icon": "iD-highway-footway", "fields": ["crossing", "access", "surface", "kerb", "tactile_paving"], "geometry": ["line"], "tags": {"highway": "footway", "footway": "crossing", "crossing": "marked", "traffic_calming": "table"}, "reference": {"key": "traffic_calming", "value": "table"}, "terms": ["zebra crossing", "marked crossing", "crosswalk", "flat top", "hump", "speed", "slow"], "name": "Marked Crosswalk (Raised)"}, - "highway/footway/marked": {"icon": "iD-highway-footway", "fields": ["crossing", "access", "surface", "kerb", "tactile_paving"], "geometry": ["line"], "tags": {"highway": "footway", "footway": "crossing", "crossing": "marked"}, "reference": {"key": "footway", "value": "crossing"}, "terms": ["zebra crossing", "marked crossing", "crosswalk"], "name": "Marked Crosswalk"}, - "highway/footway/sidewalk": {"icon": "iD-highway-footway", "geometry": ["line"], "tags": {"highway": "footway", "footway": "sidewalk"}, "reference": {"key": "footway", "value": "sidewalk"}, "terms": ["pavement", "sidepath"], "name": "Sidewalk"}, + "highway/footway": {"icon": "temaki-pedestrian", "fields": ["name", "surface", "width", "structure", "access", "incline"], "moreFields": ["wheelchair", "lit", "smoothness", "covered", "dog"], "geometry": ["line"], "terms": ["hike", "hiking", "trackway", "trail", "walk"], "tags": {"highway": "footway"}, "name": "Foot Path"}, + "highway/footway/zebra-raised": {"icon": "temaki-pedestrian", "fields": ["crossing", "access", "surface", "kerb", "tactile_paving"], "geometry": ["line"], "tags": {"highway": "footway", "footway": "crossing", "crossing": "zebra", "traffic_calming": "table"}, "reference": {"key": "traffic_calming", "value": "table"}, "terms": ["zebra crossing", "marked crossing", "crosswalk", "flat top", "hump", "speed", "slow"], "name": "Marked Crosswalk (Raised)", "searchable": false}, + "highway/footway/zebra": {"icon": "temaki-pedestrian", "fields": ["crossing", "access", "surface", "kerb", "tactile_paving"], "geometry": ["line"], "tags": {"highway": "footway", "footway": "crossing", "crossing": "zebra"}, "reference": {"key": "footway", "value": "crossing"}, "terms": ["zebra crossing", "marked crossing", "crosswalk"], "name": "Marked Crosswalk", "searchable": false}, + "highway/footway/conveying": {"icon": "temaki-pedestrian", "fields": ["name", "conveying", "access_simple", "lit", "width", "wheelchair"], "geometry": ["line"], "terms": ["moving sidewalk", "autwalk", "skywalk", "travolator", "travelator", "travellator", "conveyor"], "tags": {"highway": "footway", "conveying": "*"}, "name": "Moving Walkway"}, + "highway/footway/marked-raised": {"icon": "temaki-pedestrian", "fields": ["crossing", "access", "surface", "kerb", "tactile_paving"], "geometry": ["line"], "tags": {"highway": "footway", "footway": "crossing", "crossing": "marked", "traffic_calming": "table"}, "reference": {"key": "traffic_calming", "value": "table"}, "terms": ["zebra crossing", "marked crossing", "crosswalk", "flat top", "hump", "speed", "slow"], "name": "Marked Crosswalk (Raised)"}, + "highway/footway/marked": {"icon": "temaki-pedestrian", "fields": ["crossing", "access", "surface", "kerb", "tactile_paving"], "geometry": ["line"], "tags": {"highway": "footway", "footway": "crossing", "crossing": "marked"}, "reference": {"key": "footway", "value": "crossing"}, "terms": ["zebra crossing", "marked crossing", "crosswalk"], "name": "Marked Crosswalk"}, + "highway/footway/sidewalk": {"icon": "temaki-pedestrian", "geometry": ["line"], "tags": {"highway": "footway", "footway": "sidewalk"}, "reference": {"key": "footway", "value": "sidewalk"}, "terms": ["pavement", "sidepath"], "name": "Sidewalk"}, "highway/footway/unmarked-raised": {"fields": ["crossing", "access", "surface", "kerb", "tactile_paving"], "geometry": ["line"], "addTags": {"highway": "footway", "footway": "crossing", "crossing": "unmarked", "traffic_calming": "table"}, "removeTags": {"highway": "footway", "footway": "crossing", "crossing": "unmarked", "traffic_calming": "table"}, "tags": {"highway": "footway", "footway": "crossing", "traffic_calming": "table"}, "reference": {"key": "traffic_calming", "value": "table"}, "terms": ["flat top", "hump", "speed", "slow"], "name": "Unmarked Crossing (Raised)"}, "highway/footway/unmarked": {"fields": ["crossing", "access", "surface", "kerb", "tactile_paving"], "geometry": ["line"], "addTags": {"highway": "footway", "footway": "crossing", "crossing": "unmarked"}, "removeTags": {"highway": "footway", "footway": "crossing", "crossing": "unmarked"}, "tags": {"highway": "footway", "footway": "crossing"}, "reference": {"key": "footway", "value": "crossing"}, "terms": [], "name": "Unmarked Crossing"}, "highway/give_way": {"icon": "temaki-yield", "fields": ["direction_vertex"], "geometry": ["vertex"], "tags": {"highway": "give_way"}, "terms": ["give way", "yield", "sign"], "name": "Yield Sign"}, @@ -434,7 +434,7 @@ "highway/passing_place": {"icon": "maki-circle-stroked", "geometry": ["vertex"], "tags": {"highway": "passing_place"}, "terms": ["turnout, pullout"], "name": "Passing Place"}, "highway/path": {"icon": "iD-highway-path", "fields": ["name", "surface", "width", "structure", "access", "incline"], "moreFields": ["wheelchair", "lit", "smoothness", "trail_visibility", "sac_scale", "mtb/scale", "mtb/scale/uphill", "mtb/scale/imba", "horse_scale", "covered", "ref", "dog"], "geometry": ["line"], "terms": ["hike", "hiking", "trackway", "trail", "walk"], "tags": {"highway": "path"}, "name": "Path"}, "highway/pedestrian_area": {"icon": "temaki-pedestrian", "fields": ["name", "surface", "lit", "width", "structure", "access"], "geometry": ["area"], "tags": {"highway": "pedestrian", "area": "yes"}, "terms": ["center", "centre", "plaza", "quad", "square", "walkway"], "name": "Pedestrian Area"}, - "highway/pedestrian_line": {"icon": "iD-highway-footway", "fields": ["name", "surface", "lit", "width", "oneway", "structure", "access"], "moreFields": ["covered", "smoothness"], "geometry": ["line"], "tags": {"highway": "pedestrian"}, "terms": ["center", "centre", "plaza", "quad", "square", "walkway"], "name": "Pedestrian Street"}, + "highway/pedestrian_line": {"icon": "temaki-pedestrian", "fields": ["name", "surface", "lit", "width", "oneway", "structure", "access"], "moreFields": ["covered", "smoothness"], "geometry": ["line"], "tags": {"highway": "pedestrian"}, "terms": ["center", "centre", "plaza", "quad", "square", "walkway"], "name": "Pedestrian Street"}, "highway/primary_link": {"icon": "iD-highway-primary-link", "fields": ["destination_oneway", "destination/ref_oneway", "oneway", "maxspeed", "lanes", "surface", "structure", "access"], "moreFields": ["covered", "cycleway", "destination/symbol_oneway", "junction/ref_oneway", "lit", "maxheight", "maxspeed/advisory", "name", "oneway/bicycle", "ref_road_number", "smoothness", "toll"], "geometry": ["line"], "tags": {"highway": "primary_link"}, "terms": ["on ramp", "off ramp", "ramp", "road", "street"], "name": "Primary Link"}, "highway/primary": {"icon": "iD-highway-primary", "fields": ["name", "oneway", "maxspeed", "lanes", "surface", "structure", "ref_road_number", "access"], "moreFields": ["covered", "cycleway", "lit", "maxheight", "maxspeed/advisory", "oneway/bicycle", "smoothness", "toll"], "geometry": ["line"], "tags": {"highway": "primary"}, "terms": ["road", "street"], "name": "Primary Road"}, "highway/raceway": {"icon": "iD-highway-unclassified", "fields": ["name", "oneway", "surface", "sport_racing_motor", "lit", "width", "lanes", "structure"], "geometry": ["point", "line", "area"], "tags": {"highway": "raceway"}, "addTags": {"highway": "raceway", "sport": "motor"}, "terms": ["auto*", "formula one", "kart", "motocross", "nascar", "race*", "track"], "name": "Racetrack (Motorsport)"}, @@ -622,7 +622,7 @@ "man_made/monitoring_station": {"icon": "temaki-antenna", "geometry": ["point", "vertex", "area"], "fields": ["monitoring_multi", "operator"], "terms": ["weather", "earthquake", "seismology", "air", "gps"], "tags": {"man_made": "monitoring_station"}, "name": "Monitoring Station"}, "man_made/observatory": {"fields": ["name", "operator", "address", "access_simple", "building_area"], "moreFields": ["website", "phone", "email", "fax"], "geometry": ["point", "area"], "terms": ["astronomical", "meteorological"], "tags": {"man_made": "observatory"}, "name": "Observatory"}, "man_made/petroleum_well": {"icon": "temaki-storage_tank", "geometry": ["point"], "terms": ["drilling rig", "oil derrick", "oil drill", "oil horse", "oil rig", "oil pump", "petroleum well", "pumpjack"], "tags": {"man_made": "petroleum_well"}, "name": "Oil Well"}, - "man_made/pier": {"icon": "iD-highway-footway", "fields": ["name", "surface", "lit", "width", "access"], "geometry": ["line", "area"], "terms": ["dock", "jetty"], "tags": {"man_made": "pier"}, "name": "Pier"}, + "man_made/pier": {"icon": "temaki-pedestrian", "fields": ["name", "surface", "lit", "width", "access"], "geometry": ["line", "area"], "terms": ["dock", "jetty"], "tags": {"man_made": "pier"}, "name": "Pier"}, "man_made/pipeline": {"icon": "iD-pipeline-line", "fields": ["location", "operator", "substance", "layer"], "geometry": ["line"], "terms": ["oil", "natural gas", "water", "sewer", "sewage"], "tags": {"man_made": "pipeline"}, "name": "Pipeline"}, "man_made/pumping_station": {"icon": "maki-water", "geometry": ["point", "area"], "tags": {"man_made": "pumping_station"}, "name": "Pumping Station"}, "man_made/silo": {"icon": "temaki-silo", "fields": ["crop", "building_area"], "geometry": ["point", "area"], "terms": ["grain", "corn", "wheat"], "tags": {"man_made": "silo"}, "name": "Silo"}, @@ -816,20 +816,20 @@ "railway/disused": {"icon": "iD-railway-disused", "fields": ["structure", "service_rail", "usage_rail"], "moreFields": ["covered"], "geometry": ["line"], "tags": {"railway": "disused"}, "terms": [], "name": "Disused Railway"}, "railway/funicular": {"icon": "iD-railway-rail", "geometry": ["line"], "terms": ["venicular", "cliff railway", "cable car", "cable railway", "funicular railway"], "fields": ["structure", "gauge", "service_rail"], "tags": {"railway": "funicular"}, "name": "Funicular"}, "railway/level_crossing": {"icon": "maki-cross", "geometry": ["vertex"], "tags": {"railway": "level_crossing"}, "terms": ["crossing", "railroad crossing", "level crossing", "grade crossing", "road through railroad", "train crossing"], "name": "Railway Crossing (Road)"}, - "railway/light_rail": {"icon": "iD-railway-light-rail", "fields": ["name", "structure", "gauge", "electrified", "service_rail", "usage_rail"], "moreFields": ["covered", "frequency_electrified", "maxspeed", "voltage_electrified"], "geometry": ["line"], "tags": {"railway": "light_rail"}, "terms": ["light rail", "streetcar", "trolley"], "name": "Light Rail"}, + "railway/light_rail": {"icon": "temaki-light_rail", "fields": ["name", "structure", "gauge", "electrified", "service_rail", "usage_rail"], "moreFields": ["covered", "frequency_electrified", "maxspeed", "voltage_electrified"], "geometry": ["line"], "tags": {"railway": "light_rail"}, "terms": ["light rail", "streetcar", "trolley"], "name": "Light Rail"}, "railway/milestone": {"icon": "temaki-milestone", "geometry": ["point", "vertex"], "fields": ["railway/position", "direction_vertex"], "tags": {"railway": "milestone"}, "terms": ["milestone", "marker"], "name": "Railway Milestone"}, "railway/miniature": {"icon": "iD-railway-rail", "fields": ["name", "structure", "gauge", "electrified", "service_rail"], "moreFields": ["covered", "frequency_electrified", "maxspeed", "voltage_electrified"], "geometry": ["line"], "tags": {"railway": "miniature"}, "terms": ["rideable miniature railway", "narrow gauge railway", "minimum gauge railway"], "name": "Miniature Railway"}, - "railway/monorail": {"icon": "iD-railway-monorail", "fields": ["name", "structure", "electrified", "service_rail", "usage_rail"], "moreFields": ["covered", "frequency_electrified", "maxspeed", "voltage_electrified"], "geometry": ["line"], "tags": {"railway": "monorail"}, "terms": [], "name": "Monorail"}, + "railway/monorail": {"icon": "temaki-monorail", "fields": ["name", "structure", "electrified", "service_rail", "usage_rail"], "moreFields": ["covered", "frequency_electrified", "maxspeed", "voltage_electrified"], "geometry": ["line"], "tags": {"railway": "monorail"}, "terms": [], "name": "Monorail"}, "railway/narrow_gauge": {"icon": "iD-railway-rail", "fields": ["name", "structure", "gauge", "electrified", "service_rail", "usage_rail"], "moreFields": ["covered", "frequency_electrified", "maxspeed", "voltage_electrified"], "geometry": ["line"], "tags": {"railway": "narrow_gauge"}, "terms": ["narrow gauge railway", "narrow gauge railroad"], "name": "Narrow Gauge Rail"}, "railway/rail": {"icon": "iD-railway-rail", "fields": ["name", "structure", "gauge", "electrified", "service_rail", "usage_rail"], "moreFields": ["covered", "frequency_electrified", "maxspeed", "voltage_electrified"], "geometry": ["line"], "tags": {"railway": "rail"}, "terms": [], "name": "Rail"}, "railway/signal": {"icon": "temaki-railway_signals", "geometry": ["point", "vertex"], "fields": ["railway/position", "railway/signal/direction", "ref"], "tags": {"railway": "signal"}, "terms": ["signal", "lights"], "name": "Railway Signal"}, "railway/subway_entrance": {"icon": "maki-entrance", "geometry": ["point", "vertex"], "fields": ["name"], "tags": {"railway": "subway_entrance"}, "terms": ["metro", "transit"], "name": "Subway Entrance"}, - "railway/subway": {"icon": "iD-railway-subway", "fields": ["name", "structure", "gauge", "electrified", "service_rail", "usage_rail"], "moreFields": ["maxspeed", "voltage_electrified", "frequency_electrified"], "geometry": ["line"], "tags": {"railway": "subway"}, "terms": ["metro", "transit"], "name": "Subway"}, + "railway/subway": {"icon": "temaki-subway", "fields": ["name", "structure", "gauge", "electrified", "service_rail", "usage_rail"], "moreFields": ["maxspeed", "voltage_electrified", "frequency_electrified"], "geometry": ["line"], "tags": {"railway": "subway"}, "terms": ["metro", "transit"], "name": "Subway"}, "railway/switch": {"icon": "temaki-junction", "geometry": ["vertex"], "tags": {"railway": "switch"}, "terms": ["switch", "points"], "name": "Railway Switch"}, "railway/train_wash": {"icon": "maki-rail", "geometry": ["point", "vertex", "area"], "fields": ["operator", "building_area"], "tags": {"railway": "wash"}, "terms": ["wash", "clean"], "name": "Train Wash"}, - "railway/tram": {"icon": "iD-railway-light-rail", "fields": ["name", "structure", "gauge", "electrified", "service_rail", "usage_rail"], "moreFields": ["covered", "frequency_electrified", "maxspeed", "voltage_electrified"], "geometry": ["line"], "tags": {"railway": "tram"}, "terms": ["light rail", "streetcar", "tram", "trolley"], "name": "Tram"}, + "railway/tram": {"icon": "temaki-tram", "fields": ["name", "structure", "gauge", "electrified", "service_rail", "usage_rail"], "moreFields": ["covered", "frequency_electrified", "maxspeed", "voltage_electrified"], "geometry": ["line"], "tags": {"railway": "tram"}, "terms": ["light rail", "streetcar", "tram", "trolley"], "name": "Tram"}, "relation": {"icon": "iD-relation", "fields": ["name", "relation"], "geometry": ["relation"], "tags": {}, "name": "Relation"}, - "route/ferry": {"icon": "iD-ferry-line", "geometry": ["line"], "fields": ["name", "operator", "duration", "access", "to", "from"], "tags": {"route": "ferry"}, "name": "Ferry Route"}, + "route/ferry": {"icon": "maki-ferry", "geometry": ["line"], "fields": ["name", "operator", "duration", "access", "to", "from"], "tags": {"route": "ferry"}, "name": "Ferry Route"}, "seamark/beacon_isolated_danger": {"fields": ["ref", "operator", "seamark/beacon_isolated_danger/shape", "seamark/type"], "geometry": ["point", "vertex"], "terms": ["beacon isolated danger", "isolated danger beacon", "iala"], "tags": {"seamark:type": "beacon_isolated_danger"}, "name": "Danger Beacon"}, "seamark/beacon_lateral": {"fields": ["ref", "operator", "seamark/beacon_lateral/colour", "seamark/beacon_lateral/category", "seamark/beacon_lateral/shape", "seamark/beacon_lateral/system", "seamark/type"], "geometry": ["point", "vertex"], "terms": ["lateral beacon", "beacon lateral", "cevni", "channel marker", "iala", "lateral mark"], "tags": {"seamark:type": "beacon_lateral"}, "name": "Channel Beacon"}, "seamark/buoy_lateral": {"fields": ["ref", "operator", "seamark/buoy_lateral/colour", "seamark/buoy_lateral/category", "seamark/buoy_lateral/shape", "seamark/buoy_lateral/system", "seamark/type"], "geometry": ["point", "vertex"], "terms": ["lateral buoy", "buoy lateral", "cevni", "channel marker", "iala", "lateral mark"], "tags": {"seamark:type": "buoy_lateral"}, "name": "Channel Buoy"}, diff --git a/data/presets/presets/highway/bridleway.json b/data/presets/presets/highway/bridleway.json index fe485a551..61e5baa29 100644 --- a/data/presets/presets/highway/bridleway.json +++ b/data/presets/presets/highway/bridleway.json @@ -15,7 +15,7 @@ "covered", "dog" ], - "icon": "iD-highway-bridleway", + "icon": "maki-horse-riding", "geometry": [ "line" ], diff --git a/data/presets/presets/highway/bus_guideway.json b/data/presets/presets/highway/bus_guideway.json index 06e07930a..4facf21d1 100644 --- a/data/presets/presets/highway/bus_guideway.json +++ b/data/presets/presets/highway/bus_guideway.json @@ -1,5 +1,5 @@ { - "icon": "iD-highway-bus-guideway", + "icon": "maki-bus", "fields": [ "name", "operator", diff --git a/data/presets/presets/highway/construction.json b/data/presets/presets/highway/construction.json index 90fb4770c..b09d47185 100644 --- a/data/presets/presets/highway/construction.json +++ b/data/presets/presets/highway/construction.json @@ -1,5 +1,5 @@ { - "icon": "iD-highway-construction", + "icon": "maki-barrier", "fields": [ "name", "opening_date", diff --git a/data/presets/presets/highway/corridor.json b/data/presets/presets/highway/corridor.json index 7fc79c6f0..9b2fc4e99 100644 --- a/data/presets/presets/highway/corridor.json +++ b/data/presets/presets/highway/corridor.json @@ -1,5 +1,5 @@ { - "icon": "iD-highway-footway", + "icon": "temaki-pedestrian", "fields": [ "name", "width", diff --git a/data/presets/presets/highway/cycleway.json b/data/presets/presets/highway/cycleway.json index dcf6a9a87..273aa6df6 100644 --- a/data/presets/presets/highway/cycleway.json +++ b/data/presets/presets/highway/cycleway.json @@ -1,5 +1,5 @@ { - "icon": "iD-highway-cycleway", + "icon": "maki-bicycle", "fields": [ "name", "oneway", diff --git a/data/presets/presets/highway/footway.json b/data/presets/presets/highway/footway.json index 8c235f057..f43435d30 100644 --- a/data/presets/presets/highway/footway.json +++ b/data/presets/presets/highway/footway.json @@ -1,5 +1,5 @@ { - "icon": "iD-highway-footway", + "icon": "temaki-pedestrian", "fields": [ "name", "surface", diff --git a/data/presets/presets/highway/footway/_zebra-raised.json b/data/presets/presets/highway/footway/_zebra-raised.json index f6e173680..d7463d63a 100644 --- a/data/presets/presets/highway/footway/_zebra-raised.json +++ b/data/presets/presets/highway/footway/_zebra-raised.json @@ -1,5 +1,5 @@ { - "icon": "iD-highway-footway", + "icon": "temaki-pedestrian", "fields": [ "crossing", "access", diff --git a/data/presets/presets/highway/footway/_zebra.json b/data/presets/presets/highway/footway/_zebra.json index 646800847..4f9f5d7cb 100644 --- a/data/presets/presets/highway/footway/_zebra.json +++ b/data/presets/presets/highway/footway/_zebra.json @@ -1,5 +1,5 @@ { - "icon": "iD-highway-footway", + "icon": "temaki-pedestrian", "fields": [ "crossing", "access", diff --git a/data/presets/presets/highway/footway/conveying.json b/data/presets/presets/highway/footway/conveying.json index ce15fd89a..01d92297e 100644 --- a/data/presets/presets/highway/footway/conveying.json +++ b/data/presets/presets/highway/footway/conveying.json @@ -1,5 +1,5 @@ { - "icon": "iD-highway-footway", + "icon": "temaki-pedestrian", "fields": [ "name", "conveying", diff --git a/data/presets/presets/highway/footway/marked-raised.json b/data/presets/presets/highway/footway/marked-raised.json index d23d080f7..2ae6b19ff 100644 --- a/data/presets/presets/highway/footway/marked-raised.json +++ b/data/presets/presets/highway/footway/marked-raised.json @@ -1,5 +1,5 @@ { - "icon": "iD-highway-footway", + "icon": "temaki-pedestrian", "fields": [ "crossing", "access", diff --git a/data/presets/presets/highway/footway/marked.json b/data/presets/presets/highway/footway/marked.json index 71e8e499e..fa10ca7a7 100644 --- a/data/presets/presets/highway/footway/marked.json +++ b/data/presets/presets/highway/footway/marked.json @@ -1,5 +1,5 @@ { - "icon": "iD-highway-footway", + "icon": "temaki-pedestrian", "fields": [ "crossing", "access", diff --git a/data/presets/presets/highway/footway/sidewalk.json b/data/presets/presets/highway/footway/sidewalk.json index 384c3f8bf..23d10df59 100644 --- a/data/presets/presets/highway/footway/sidewalk.json +++ b/data/presets/presets/highway/footway/sidewalk.json @@ -1,5 +1,5 @@ { - "icon": "iD-highway-footway", + "icon": "temaki-pedestrian", "geometry": [ "line" ], diff --git a/data/presets/presets/highway/pedestrian_line.json b/data/presets/presets/highway/pedestrian_line.json index f045a8fc6..e98e03851 100644 --- a/data/presets/presets/highway/pedestrian_line.json +++ b/data/presets/presets/highway/pedestrian_line.json @@ -1,5 +1,5 @@ { - "icon": "iD-highway-footway", + "icon": "temaki-pedestrian", "fields": [ "name", "surface", diff --git a/data/presets/presets/man_made/pier.json b/data/presets/presets/man_made/pier.json index 61728228e..6aa46cf2f 100644 --- a/data/presets/presets/man_made/pier.json +++ b/data/presets/presets/man_made/pier.json @@ -1,5 +1,5 @@ { - "icon": "iD-highway-footway", + "icon": "temaki-pedestrian", "fields": [ "name", "surface", diff --git a/data/presets/presets/railway/light_rail.json b/data/presets/presets/railway/light_rail.json index 7e0e917c8..0eb3ca157 100644 --- a/data/presets/presets/railway/light_rail.json +++ b/data/presets/presets/railway/light_rail.json @@ -1,5 +1,5 @@ { - "icon": "iD-railway-light-rail", + "icon": "temaki-light_rail", "fields": [ "name", "structure", diff --git a/data/presets/presets/railway/monorail.json b/data/presets/presets/railway/monorail.json index 2cb45fdcc..52a06cfef 100644 --- a/data/presets/presets/railway/monorail.json +++ b/data/presets/presets/railway/monorail.json @@ -1,5 +1,5 @@ { - "icon": "iD-railway-monorail", + "icon": "temaki-monorail", "fields": [ "name", "structure", diff --git a/data/presets/presets/railway/subway.json b/data/presets/presets/railway/subway.json index b97f4da8a..f6325a58b 100644 --- a/data/presets/presets/railway/subway.json +++ b/data/presets/presets/railway/subway.json @@ -1,5 +1,5 @@ { - "icon": "iD-railway-subway", + "icon": "temaki-subway", "fields": [ "name", "structure", diff --git a/data/presets/presets/railway/tram.json b/data/presets/presets/railway/tram.json index be0b3939e..94007c00e 100644 --- a/data/presets/presets/railway/tram.json +++ b/data/presets/presets/railway/tram.json @@ -1,5 +1,5 @@ { - "icon": "iD-railway-light-rail", + "icon": "temaki-tram", "fields": [ "name", "structure", diff --git a/data/presets/presets/route/ferry.json b/data/presets/presets/route/ferry.json index 8be49a069..15e21157e 100644 --- a/data/presets/presets/route/ferry.json +++ b/data/presets/presets/route/ferry.json @@ -1,5 +1,5 @@ { - "icon": "iD-ferry-line", + "icon": "maki-ferry", "geometry": [ "line" ], @@ -7,8 +7,8 @@ "name", "operator", "duration", - "access", - "to", + "access", + "to", "from" ], "tags": { diff --git a/data/taginfo.json b/data/taginfo.json index 711676da7..88f5c1ed0 100644 --- a/data/taginfo.json +++ b/data/taginfo.json @@ -398,19 +398,19 @@ {"key": "healthcare", "value": "rehabilitation", "description": "🄿 Rehabilitation Facility", "object_types": ["node", "area"], "icon_url": "https://raw.githubusercontent.com/mapbox/maki/master/icons/hospital-15.svg?sanitize=true"}, {"key": "healthcare", "value": "speech_therapist", "description": "🄿 Speech Therapist", "object_types": ["node", "area"], "icon_url": "https://raw.githubusercontent.com/mapbox/maki/master/icons/hospital-15.svg?sanitize=true"}, {"key": "highway", "value": "bus_stop", "description": "🄿 Bus Stop / Platform (unsearchable)", "object_types": ["node"], "icon_url": "https://raw.githubusercontent.com/mapbox/maki/master/icons/bus-15.svg?sanitize=true"}, - {"key": "highway", "value": "bridleway", "description": "🄿 Bridle Path", "object_types": ["way"], "icon_url": "https://raw.githubusercontent.com/openstreetmap/iD/master/svg/iD-sprite/presets/highway-bridleway.svg?sanitize=true"}, - {"key": "highway", "value": "bus_guideway", "description": "🄿 Bus Guideway", "object_types": ["way"], "icon_url": "https://raw.githubusercontent.com/openstreetmap/iD/master/svg/iD-sprite/presets/highway-bus-guideway.svg?sanitize=true"}, - {"key": "access", "value": "no", "description": "🄿 Road Closed, 🄵 Allowed Access", "object_types": ["way"], "icon_url": "https://raw.githubusercontent.com/openstreetmap/iD/master/svg/iD-sprite/presets/highway-construction.svg?sanitize=true"}, - {"key": "highway", "value": "corridor", "description": "🄿 Indoor Corridor", "object_types": ["way"], "icon_url": "https://raw.githubusercontent.com/openstreetmap/iD/master/svg/iD-sprite/presets/highway-footway.svg?sanitize=true"}, + {"key": "highway", "value": "bridleway", "description": "🄿 Bridle Path", "object_types": ["way"], "icon_url": "https://raw.githubusercontent.com/mapbox/maki/master/icons/horse-riding-15.svg?sanitize=true"}, + {"key": "highway", "value": "bus_guideway", "description": "🄿 Bus Guideway", "object_types": ["way"], "icon_url": "https://raw.githubusercontent.com/mapbox/maki/master/icons/bus-15.svg?sanitize=true"}, + {"key": "access", "value": "no", "description": "🄿 Road Closed, 🄵 Allowed Access", "object_types": ["way"], "icon_url": "https://raw.githubusercontent.com/mapbox/maki/master/icons/barrier-15.svg?sanitize=true"}, + {"key": "highway", "value": "corridor", "description": "🄿 Indoor Corridor", "object_types": ["way"], "icon_url": "https://raw.githubusercontent.com/bhousel/temaki/master/icons/pedestrian.svg?sanitize=true"}, {"key": "traffic_calming", "value": "table", "description": "🄿 Marked Crosswalk (Raised) (unsearchable), 🄿 Marked Crosswalk (Raised), 🄿 Unmarked Crossing (Raised), 🄿 Speed Table", "object_types": ["node"], "icon_url": "https://raw.githubusercontent.com/bhousel/temaki/master/icons/pedestrian.svg?sanitize=true"}, {"key": "crossing", "value": "zebra", "description": "🄿 Marked Crosswalk (unsearchable)", "object_types": ["node"], "icon_url": "https://raw.githubusercontent.com/bhousel/temaki/master/icons/pedestrian.svg?sanitize=true"}, {"key": "crossing", "value": "marked", "description": "🄿 Marked Crosswalk", "object_types": ["node"], "icon_url": "https://raw.githubusercontent.com/bhousel/temaki/master/icons/pedestrian.svg?sanitize=true"}, {"key": "highway", "value": "crossing", "description": "🄿 Unmarked Crossing", "object_types": ["node"]}, - {"key": "highway", "value": "cycleway", "description": "🄿 Cycle Path", "object_types": ["way"], "icon_url": "https://raw.githubusercontent.com/openstreetmap/iD/master/svg/iD-sprite/presets/highway-cycleway.svg?sanitize=true"}, + {"key": "highway", "value": "cycleway", "description": "🄿 Cycle Path", "object_types": ["way"], "icon_url": "https://raw.githubusercontent.com/mapbox/maki/master/icons/bicycle-15.svg?sanitize=true"}, {"key": "highway", "value": "elevator", "description": "🄿 Elevator", "object_types": ["node"], "icon_url": "https://raw.githubusercontent.com/bhousel/temaki/master/icons/elevator.svg?sanitize=true"}, - {"key": "highway", "value": "footway", "description": "🄿 Foot Path", "object_types": ["way"], "icon_url": "https://raw.githubusercontent.com/openstreetmap/iD/master/svg/iD-sprite/presets/highway-footway.svg?sanitize=true"}, - {"key": "conveying", "description": "🄿 Moving Walkway, 🄿 Escalator", "object_types": ["way"], "icon_url": "https://raw.githubusercontent.com/openstreetmap/iD/master/svg/iD-sprite/presets/highway-footway.svg?sanitize=true"}, - {"key": "footway", "value": "sidewalk", "description": "🄿 Sidewalk", "object_types": ["way"], "icon_url": "https://raw.githubusercontent.com/openstreetmap/iD/master/svg/iD-sprite/presets/highway-footway.svg?sanitize=true"}, + {"key": "highway", "value": "footway", "description": "🄿 Foot Path", "object_types": ["way"], "icon_url": "https://raw.githubusercontent.com/bhousel/temaki/master/icons/pedestrian.svg?sanitize=true"}, + {"key": "conveying", "description": "🄿 Moving Walkway, 🄿 Escalator", "object_types": ["way"], "icon_url": "https://raw.githubusercontent.com/bhousel/temaki/master/icons/pedestrian.svg?sanitize=true"}, + {"key": "footway", "value": "sidewalk", "description": "🄿 Sidewalk", "object_types": ["way"], "icon_url": "https://raw.githubusercontent.com/bhousel/temaki/master/icons/pedestrian.svg?sanitize=true"}, {"key": "footway", "value": "crossing", "description": "🄿 Unmarked Crossing", "object_types": ["way"]}, {"key": "highway", "value": "give_way", "description": "🄿 Yield Sign", "object_types": ["node"], "icon_url": "https://raw.githubusercontent.com/bhousel/temaki/master/icons/yield.svg?sanitize=true"}, {"key": "highway", "value": "living_street", "description": "🄿 Living Street", "object_types": ["way"], "icon_url": "https://raw.githubusercontent.com/openstreetmap/iD/master/svg/iD-sprite/presets/highway-living-street.svg?sanitize=true"}, @@ -421,7 +421,7 @@ {"key": "highway", "value": "motorway", "description": "🄿 Motorway", "object_types": ["way"], "icon_url": "https://raw.githubusercontent.com/openstreetmap/iD/master/svg/iD-sprite/presets/highway-motorway.svg?sanitize=true"}, {"key": "highway", "value": "passing_place", "description": "🄿 Passing Place", "object_types": ["node"], "icon_url": "https://raw.githubusercontent.com/mapbox/maki/master/icons/circle-stroked-15.svg?sanitize=true"}, {"key": "highway", "value": "path", "description": "🄿 Path", "object_types": ["way"], "icon_url": "https://raw.githubusercontent.com/openstreetmap/iD/master/svg/iD-sprite/presets/highway-path.svg?sanitize=true"}, - {"key": "highway", "value": "pedestrian", "description": "🄿 Pedestrian Street", "object_types": ["way"], "icon_url": "https://raw.githubusercontent.com/openstreetmap/iD/master/svg/iD-sprite/presets/highway-footway.svg?sanitize=true"}, + {"key": "highway", "value": "pedestrian", "description": "🄿 Pedestrian Street", "object_types": ["way"], "icon_url": "https://raw.githubusercontent.com/bhousel/temaki/master/icons/pedestrian.svg?sanitize=true"}, {"key": "highway", "value": "primary_link", "description": "🄿 Primary Link", "object_types": ["way"], "icon_url": "https://raw.githubusercontent.com/openstreetmap/iD/master/svg/iD-sprite/presets/highway-primary-link.svg?sanitize=true"}, {"key": "highway", "value": "primary", "description": "🄿 Primary Road", "object_types": ["way"], "icon_url": "https://raw.githubusercontent.com/openstreetmap/iD/master/svg/iD-sprite/presets/highway-primary.svg?sanitize=true"}, {"key": "highway", "value": "raceway", "description": "🄿 Racetrack (Motorsport)", "object_types": ["node", "way", "area"], "icon_url": "https://raw.githubusercontent.com/openstreetmap/iD/master/svg/iD-sprite/presets/highway-unclassified.svg?sanitize=true"}, @@ -606,7 +606,7 @@ {"key": "man_made", "value": "monitoring_station", "description": "🄿 Monitoring Station", "object_types": ["node", "area"], "icon_url": "https://raw.githubusercontent.com/bhousel/temaki/master/icons/antenna.svg?sanitize=true"}, {"key": "man_made", "value": "observatory", "description": "🄿 Observatory", "object_types": ["node", "area"]}, {"key": "man_made", "value": "petroleum_well", "description": "🄿 Oil Well", "object_types": ["node"], "icon_url": "https://raw.githubusercontent.com/bhousel/temaki/master/icons/storage_tank.svg?sanitize=true"}, - {"key": "man_made", "value": "pier", "description": "🄿 Pier", "object_types": ["way", "area"], "icon_url": "https://raw.githubusercontent.com/openstreetmap/iD/master/svg/iD-sprite/presets/highway-footway.svg?sanitize=true"}, + {"key": "man_made", "value": "pier", "description": "🄿 Pier", "object_types": ["way", "area"], "icon_url": "https://raw.githubusercontent.com/bhousel/temaki/master/icons/pedestrian.svg?sanitize=true"}, {"key": "man_made", "value": "pipeline", "description": "🄿 Pipeline", "object_types": ["way"], "icon_url": "https://raw.githubusercontent.com/openstreetmap/iD/master/svg/iD-sprite/presets/pipeline-line.svg?sanitize=true"}, {"key": "man_made", "value": "pumping_station", "description": "🄿 Pumping Station", "object_types": ["node", "area"], "icon_url": "https://raw.githubusercontent.com/mapbox/maki/master/icons/water-15.svg?sanitize=true"}, {"key": "man_made", "value": "silo", "description": "🄿 Silo", "object_types": ["node", "area"], "icon_url": "https://raw.githubusercontent.com/bhousel/temaki/master/icons/silo.svg?sanitize=true"}, @@ -777,19 +777,19 @@ {"key": "railway", "value": "disused", "description": "🄿 Disused Railway", "object_types": ["way"], "icon_url": "https://raw.githubusercontent.com/openstreetmap/iD/master/svg/iD-sprite/presets/railway-disused.svg?sanitize=true"}, {"key": "railway", "value": "funicular", "description": "🄿 Funicular", "object_types": ["way"], "icon_url": "https://raw.githubusercontent.com/openstreetmap/iD/master/svg/iD-sprite/presets/railway-rail.svg?sanitize=true"}, {"key": "railway", "value": "level_crossing", "description": "🄿 Railway Crossing (Road)", "object_types": ["node"], "icon_url": "https://raw.githubusercontent.com/mapbox/maki/master/icons/cross-15.svg?sanitize=true"}, - {"key": "railway", "value": "light_rail", "description": "🄿 Light Rail", "object_types": ["way"], "icon_url": "https://raw.githubusercontent.com/openstreetmap/iD/master/svg/iD-sprite/presets/railway-light-rail.svg?sanitize=true"}, + {"key": "railway", "value": "light_rail", "description": "🄿 Light Rail", "object_types": ["way"], "icon_url": "https://raw.githubusercontent.com/bhousel/temaki/master/icons/light_rail.svg?sanitize=true"}, {"key": "railway", "value": "milestone", "description": "🄿 Railway Milestone", "object_types": ["node"], "icon_url": "https://raw.githubusercontent.com/bhousel/temaki/master/icons/milestone.svg?sanitize=true"}, {"key": "railway", "value": "miniature", "description": "🄿 Miniature Railway", "object_types": ["way"], "icon_url": "https://raw.githubusercontent.com/openstreetmap/iD/master/svg/iD-sprite/presets/railway-rail.svg?sanitize=true"}, - {"key": "railway", "value": "monorail", "description": "🄿 Monorail", "object_types": ["way"], "icon_url": "https://raw.githubusercontent.com/openstreetmap/iD/master/svg/iD-sprite/presets/railway-monorail.svg?sanitize=true"}, + {"key": "railway", "value": "monorail", "description": "🄿 Monorail", "object_types": ["way"], "icon_url": "https://raw.githubusercontent.com/bhousel/temaki/master/icons/monorail.svg?sanitize=true"}, {"key": "railway", "value": "narrow_gauge", "description": "🄿 Narrow Gauge Rail", "object_types": ["way"], "icon_url": "https://raw.githubusercontent.com/openstreetmap/iD/master/svg/iD-sprite/presets/railway-rail.svg?sanitize=true"}, {"key": "railway", "value": "rail", "description": "🄿 Rail", "object_types": ["way"], "icon_url": "https://raw.githubusercontent.com/openstreetmap/iD/master/svg/iD-sprite/presets/railway-rail.svg?sanitize=true"}, {"key": "railway", "value": "signal", "description": "🄿 Railway Signal", "object_types": ["node"], "icon_url": "https://raw.githubusercontent.com/bhousel/temaki/master/icons/railway_signals.svg?sanitize=true"}, {"key": "railway", "value": "subway_entrance", "description": "🄿 Subway Entrance", "object_types": ["node"], "icon_url": "https://raw.githubusercontent.com/mapbox/maki/master/icons/entrance-15.svg?sanitize=true"}, - {"key": "railway", "value": "subway", "description": "🄿 Subway", "object_types": ["way"], "icon_url": "https://raw.githubusercontent.com/openstreetmap/iD/master/svg/iD-sprite/presets/railway-subway.svg?sanitize=true"}, + {"key": "railway", "value": "subway", "description": "🄿 Subway", "object_types": ["way"], "icon_url": "https://raw.githubusercontent.com/bhousel/temaki/master/icons/subway.svg?sanitize=true"}, {"key": "railway", "value": "switch", "description": "🄿 Railway Switch", "object_types": ["node"], "icon_url": "https://raw.githubusercontent.com/bhousel/temaki/master/icons/junction.svg?sanitize=true"}, {"key": "railway", "value": "wash", "description": "🄿 Train Wash", "object_types": ["node", "area"], "icon_url": "https://raw.githubusercontent.com/mapbox/maki/master/icons/rail-15.svg?sanitize=true"}, - {"key": "railway", "value": "tram", "description": "🄿 Tram", "object_types": ["way"], "icon_url": "https://raw.githubusercontent.com/openstreetmap/iD/master/svg/iD-sprite/presets/railway-light-rail.svg?sanitize=true"}, - {"key": "route", "value": "ferry", "description": "🄿 Ferry Route", "object_types": ["way"], "icon_url": "https://raw.githubusercontent.com/openstreetmap/iD/master/svg/iD-sprite/presets/ferry-line.svg?sanitize=true"}, + {"key": "railway", "value": "tram", "description": "🄿 Tram", "object_types": ["way"], "icon_url": "https://raw.githubusercontent.com/bhousel/temaki/master/icons/tram.svg?sanitize=true"}, + {"key": "route", "value": "ferry", "description": "🄿 Ferry Route", "object_types": ["way"], "icon_url": "https://raw.githubusercontent.com/mapbox/maki/master/icons/ferry-15.svg?sanitize=true"}, {"key": "seamark:type", "value": "beacon_isolated_danger", "description": "🄿 Danger Beacon", "object_types": ["node"]}, {"key": "seamark:type", "value": "beacon_lateral", "description": "🄿 Channel Beacon", "object_types": ["node"]}, {"key": "seamark:type", "value": "buoy_lateral", "description": "🄿 Channel Buoy", "object_types": ["node"]}, diff --git a/modules/ui/preset_icon.js b/modules/ui/preset_icon.js index a52fc87a3..a241049fc 100644 --- a/modules/ui/preset_icon.js +++ b/modules/ui/preset_icon.js @@ -34,11 +34,17 @@ export function uiPresetIcon() { var isTemaki = /^temaki-/.test(picon); var isFa = /^fa[srb]-/.test(picon); var isPOI = isMaki || isTemaki || isFa; - var isFramed = (geom === 'area' || geom === 'vertex'); + var isCategory = !p.setTags; + var drawLine = geom === 'line' && !isCategory; + var isFramed = (geom === 'area' || drawLine || geom === 'vertex'); var tagClasses = ''; - for (var k in p.tags) { - var v = p.tags[k]; + var tags = isCategory ? p.tags : p.setTags({}, geom); + for (var k in tags) { + if (k === 'piste:type') { // avoid a ':' in the class name + k = 'piste'; + } + var v = tags[k]; tagClasses += ' tag-' + k; if (v !== '*') { tagClasses += ' tag-' + k + '-' + v; @@ -63,6 +69,28 @@ export function uiPresetIcon() { return 'preset-icon-fill preset-icon-fill-' + geom + tagClasses; }); + var line = selection.selectAll('.preset-icon-line') + .data(drawLine ? [0] : []); + + line.exit() + .remove(); + + line = line.enter() + .append('svg') + .attr('class', 'preset-icon-line') + .attr('width', 40) + .attr('height', 30) + .merge(line); + + line.html(''); + + line.append('path') + .attr('d', 'M0 13.5 L40 13.5') + .attr('class', 'line casing' + tagClasses); + line.append('path') + .attr('d', 'M0 13.5 L40 13.5') + .attr('class', 'line stroke' + tagClasses); + var areaFrame = selection.selectAll('.preset-icon-frame') .data((geom === 'area') ? [0] : []); @@ -86,13 +114,13 @@ export function uiPresetIcon() { .merge(icon); icon - .attr('class', 'preset-icon preset-icon-' + + .attr('class', 'preset-icon ' + geom + '-geom ' + 'preset-icon-' + (isPOI ? (isFramed ? '24' : '28') : (isFramed ? '44' : '60')) ); icon.selectAll('svg') .attr('class', function() { - return 'icon ' + picon + (isPOI ? '' : tagClasses); + return 'icon ' + picon + (isPOI && geom !== 'line' ? '' : tagClasses); }); icon.selectAll('use') diff --git a/svg/iD-sprite/presets/ferry-line.svg b/svg/iD-sprite/presets/ferry-line.svg deleted file mode 100644 index 962c9c240..000000000 --- a/svg/iD-sprite/presets/ferry-line.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/svg/iD-sprite/presets/highway-bridleway.svg b/svg/iD-sprite/presets/highway-bridleway.svg deleted file mode 100644 index b778cb320..000000000 --- a/svg/iD-sprite/presets/highway-bridleway.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/svg/iD-sprite/presets/highway-bus-guideway.svg b/svg/iD-sprite/presets/highway-bus-guideway.svg deleted file mode 100644 index 16391772f..000000000 --- a/svg/iD-sprite/presets/highway-bus-guideway.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/svg/iD-sprite/presets/highway-construction.svg b/svg/iD-sprite/presets/highway-construction.svg deleted file mode 100644 index 2aa3d485a..000000000 --- a/svg/iD-sprite/presets/highway-construction.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/svg/iD-sprite/presets/highway-cycleway.svg b/svg/iD-sprite/presets/highway-cycleway.svg deleted file mode 100644 index 1388dc50e..000000000 --- a/svg/iD-sprite/presets/highway-cycleway.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/svg/iD-sprite/presets/highway-footway.svg b/svg/iD-sprite/presets/highway-footway.svg deleted file mode 100644 index 8f690d238..000000000 --- a/svg/iD-sprite/presets/highway-footway.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/svg/iD-sprite/presets/highway-living-street.svg b/svg/iD-sprite/presets/highway-living-street.svg index d653566ae..3daa34530 100644 --- a/svg/iD-sprite/presets/highway-living-street.svg +++ b/svg/iD-sprite/presets/highway-living-street.svg @@ -1,15 +1,9 @@ - + - - - - - - - \ No newline at end of file + diff --git a/svg/iD-sprite/presets/highway-motorway-link.svg b/svg/iD-sprite/presets/highway-motorway-link.svg index f47c5ce1e..2028c39c6 100644 --- a/svg/iD-sprite/presets/highway-motorway-link.svg +++ b/svg/iD-sprite/presets/highway-motorway-link.svg @@ -1,6 +1,6 @@ - + @@ -13,16 +13,4 @@ - - - - - - - - - - - - - \ No newline at end of file + diff --git a/svg/iD-sprite/presets/highway-motorway.svg b/svg/iD-sprite/presets/highway-motorway.svg index ebd83a1cc..ee7c03858 100644 --- a/svg/iD-sprite/presets/highway-motorway.svg +++ b/svg/iD-sprite/presets/highway-motorway.svg @@ -1,12 +1,6 @@ - - - - - - - + - \ No newline at end of file + diff --git a/svg/iD-sprite/presets/highway-path.svg b/svg/iD-sprite/presets/highway-path.svg index 3c9fb869a..df21a8604 100644 --- a/svg/iD-sprite/presets/highway-path.svg +++ b/svg/iD-sprite/presets/highway-path.svg @@ -1,9 +1,5 @@ - - - - - + - \ No newline at end of file + diff --git a/svg/iD-sprite/presets/highway-primary-link.svg b/svg/iD-sprite/presets/highway-primary-link.svg index f28f5cbf2..1a460ee81 100644 --- a/svg/iD-sprite/presets/highway-primary-link.svg +++ b/svg/iD-sprite/presets/highway-primary-link.svg @@ -1,6 +1,6 @@ - + @@ -12,16 +12,4 @@ - - - - - - - - - - - - - \ No newline at end of file + diff --git a/svg/iD-sprite/presets/highway-primary.svg b/svg/iD-sprite/presets/highway-primary.svg index 8c48e1cec..1fcc41796 100644 --- a/svg/iD-sprite/presets/highway-primary.svg +++ b/svg/iD-sprite/presets/highway-primary.svg @@ -1,12 +1,6 @@ - - - - - - - + - \ No newline at end of file + diff --git a/svg/iD-sprite/presets/highway-residential.svg b/svg/iD-sprite/presets/highway-residential.svg index 2423fb241..db872ac38 100644 --- a/svg/iD-sprite/presets/highway-residential.svg +++ b/svg/iD-sprite/presets/highway-residential.svg @@ -1,15 +1,9 @@ - + - - - - - - - \ No newline at end of file + diff --git a/svg/iD-sprite/presets/highway-road.svg b/svg/iD-sprite/presets/highway-road.svg index 72eaef359..02e90859e 100644 --- a/svg/iD-sprite/presets/highway-road.svg +++ b/svg/iD-sprite/presets/highway-road.svg @@ -1,11 +1,5 @@ - - - - - - - + - \ No newline at end of file + diff --git a/svg/iD-sprite/presets/highway-secondary-link.svg b/svg/iD-sprite/presets/highway-secondary-link.svg index 1aa50ac40..7cd82c020 100644 --- a/svg/iD-sprite/presets/highway-secondary-link.svg +++ b/svg/iD-sprite/presets/highway-secondary-link.svg @@ -1,6 +1,6 @@ - + @@ -12,16 +12,4 @@ - - - - - - - - - - - - - \ No newline at end of file + diff --git a/svg/iD-sprite/presets/highway-secondary.svg b/svg/iD-sprite/presets/highway-secondary.svg index f0e1f2387..8aa0e7d3b 100644 --- a/svg/iD-sprite/presets/highway-secondary.svg +++ b/svg/iD-sprite/presets/highway-secondary.svg @@ -1,12 +1,6 @@ - - - - - - - + - \ No newline at end of file + diff --git a/svg/iD-sprite/presets/highway-service.svg b/svg/iD-sprite/presets/highway-service.svg index e2d02d260..ec1e6246f 100644 --- a/svg/iD-sprite/presets/highway-service.svg +++ b/svg/iD-sprite/presets/highway-service.svg @@ -1,13 +1,7 @@ - - - - - - - + - \ No newline at end of file + diff --git a/svg/iD-sprite/presets/highway-steps.svg b/svg/iD-sprite/presets/highway-steps.svg index 8ec6f5885..1afe05f6f 100644 --- a/svg/iD-sprite/presets/highway-steps.svg +++ b/svg/iD-sprite/presets/highway-steps.svg @@ -1,10 +1,6 @@ - + - - - - - \ No newline at end of file + diff --git a/svg/iD-sprite/presets/highway-tertiary-link.svg b/svg/iD-sprite/presets/highway-tertiary-link.svg index b7ccebc18..875390747 100644 --- a/svg/iD-sprite/presets/highway-tertiary-link.svg +++ b/svg/iD-sprite/presets/highway-tertiary-link.svg @@ -1,6 +1,6 @@ - + @@ -10,16 +10,4 @@ - - - - - - - - - - - - - \ No newline at end of file + diff --git a/svg/iD-sprite/presets/highway-tertiary.svg b/svg/iD-sprite/presets/highway-tertiary.svg index 63b383b42..c5968d30c 100644 --- a/svg/iD-sprite/presets/highway-tertiary.svg +++ b/svg/iD-sprite/presets/highway-tertiary.svg @@ -1,12 +1,6 @@ - - - - - - - + - \ No newline at end of file + diff --git a/svg/iD-sprite/presets/highway-track.svg b/svg/iD-sprite/presets/highway-track.svg index 89958082c..eb76c8653 100644 --- a/svg/iD-sprite/presets/highway-track.svg +++ b/svg/iD-sprite/presets/highway-track.svg @@ -1,14 +1,7 @@ - - - - - - - - + - \ No newline at end of file + diff --git a/svg/iD-sprite/presets/highway-trunk-link.svg b/svg/iD-sprite/presets/highway-trunk-link.svg index 0028e07ee..d0ad96567 100644 --- a/svg/iD-sprite/presets/highway-trunk-link.svg +++ b/svg/iD-sprite/presets/highway-trunk-link.svg @@ -1,6 +1,6 @@ - + @@ -15,16 +15,4 @@ - - - - - - - - - - - - - \ No newline at end of file + diff --git a/svg/iD-sprite/presets/highway-trunk.svg b/svg/iD-sprite/presets/highway-trunk.svg index dc295bd32..8c55645fb 100644 --- a/svg/iD-sprite/presets/highway-trunk.svg +++ b/svg/iD-sprite/presets/highway-trunk.svg @@ -1,12 +1,6 @@ - - - - - - - + - \ No newline at end of file + diff --git a/svg/iD-sprite/presets/highway-unclassified.svg b/svg/iD-sprite/presets/highway-unclassified.svg index 2ceff69db..375fc06fe 100644 --- a/svg/iD-sprite/presets/highway-unclassified.svg +++ b/svg/iD-sprite/presets/highway-unclassified.svg @@ -1,11 +1,5 @@ - - - - - - - + - \ No newline at end of file + diff --git a/svg/iD-sprite/presets/other-line.svg b/svg/iD-sprite/presets/other-line.svg index 79b401464..02e90859e 100644 --- a/svg/iD-sprite/presets/other-line.svg +++ b/svg/iD-sprite/presets/other-line.svg @@ -1,9 +1,5 @@ - - - - - + - \ No newline at end of file + diff --git a/svg/iD-sprite/presets/pipeline-line.svg b/svg/iD-sprite/presets/pipeline-line.svg index 7aa41868d..c85597f0f 100644 --- a/svg/iD-sprite/presets/pipeline-line.svg +++ b/svg/iD-sprite/presets/pipeline-line.svg @@ -1,12 +1,9 @@ - + - - - - \ No newline at end of file + diff --git a/svg/iD-sprite/presets/piste-line.svg b/svg/iD-sprite/presets/piste-line.svg deleted file mode 100644 index 1b4c703f2..000000000 --- a/svg/iD-sprite/presets/piste-line.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/svg/iD-sprite/presets/power-line.svg b/svg/iD-sprite/presets/power-line.svg index eb83c42f6..38f5e3825 100644 --- a/svg/iD-sprite/presets/power-line.svg +++ b/svg/iD-sprite/presets/power-line.svg @@ -1,9 +1,6 @@ - - - - + - \ No newline at end of file + diff --git a/svg/iD-sprite/presets/railway-abandoned.svg b/svg/iD-sprite/presets/railway-abandoned.svg index 571a1e8f9..c0b9f0508 100644 --- a/svg/iD-sprite/presets/railway-abandoned.svg +++ b/svg/iD-sprite/presets/railway-abandoned.svg @@ -1,6 +1,6 @@ - + @@ -12,8 +12,4 @@ - - - - - \ No newline at end of file + diff --git a/svg/iD-sprite/presets/railway-disused.svg b/svg/iD-sprite/presets/railway-disused.svg index 08a5cc4ab..e0b43c118 100644 --- a/svg/iD-sprite/presets/railway-disused.svg +++ b/svg/iD-sprite/presets/railway-disused.svg @@ -1,6 +1,6 @@ - + @@ -9,14 +9,10 @@ - - - - - \ No newline at end of file + diff --git a/svg/iD-sprite/presets/railway-light-rail.svg b/svg/iD-sprite/presets/railway-light-rail.svg deleted file mode 100644 index ad54846b9..000000000 --- a/svg/iD-sprite/presets/railway-light-rail.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/svg/iD-sprite/presets/railway-monorail.svg b/svg/iD-sprite/presets/railway-monorail.svg deleted file mode 100644 index 809f90914..000000000 --- a/svg/iD-sprite/presets/railway-monorail.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/svg/iD-sprite/presets/railway-rail.svg b/svg/iD-sprite/presets/railway-rail.svg index afb6864c1..036b7c561 100644 --- a/svg/iD-sprite/presets/railway-rail.svg +++ b/svg/iD-sprite/presets/railway-rail.svg @@ -1,9 +1,5 @@ - - - - - + - \ No newline at end of file + diff --git a/svg/iD-sprite/presets/railway-subway.svg b/svg/iD-sprite/presets/railway-subway.svg deleted file mode 100644 index 4f70688bd..000000000 --- a/svg/iD-sprite/presets/railway-subway.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/svg/iD-sprite/presets/railway-tram.svg b/svg/iD-sprite/presets/railway-tram.svg deleted file mode 100644 index bfb92be43..000000000 --- a/svg/iD-sprite/presets/railway-tram.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/svg/iD-sprite/presets/waterway-canal.svg b/svg/iD-sprite/presets/waterway-canal.svg index 7597c84db..aacfe6233 100644 --- a/svg/iD-sprite/presets/waterway-canal.svg +++ b/svg/iD-sprite/presets/waterway-canal.svg @@ -1,9 +1,5 @@ - - + - - - - \ No newline at end of file + diff --git a/svg/iD-sprite/presets/waterway-ditch.svg b/svg/iD-sprite/presets/waterway-ditch.svg index ddc97838a..20f45fa77 100644 --- a/svg/iD-sprite/presets/waterway-ditch.svg +++ b/svg/iD-sprite/presets/waterway-ditch.svg @@ -1,9 +1,6 @@ - - + - - - \ No newline at end of file + diff --git a/svg/iD-sprite/presets/waterway-river.svg b/svg/iD-sprite/presets/waterway-river.svg index dad12e25d..4b3c9b68b 100644 --- a/svg/iD-sprite/presets/waterway-river.svg +++ b/svg/iD-sprite/presets/waterway-river.svg @@ -1,9 +1,6 @@ - - + - - - \ No newline at end of file + diff --git a/svg/iD-sprite/presets/waterway-stream.svg b/svg/iD-sprite/presets/waterway-stream.svg index 698401bfb..e84c29ca8 100644 --- a/svg/iD-sprite/presets/waterway-stream.svg +++ b/svg/iD-sprite/presets/waterway-stream.svg @@ -1,9 +1,6 @@ - - + - - - \ No newline at end of file + From f443144fc645bf01d858a762d5b5dcb0882d8177 Mon Sep 17 00:00:00 2001 From: Quincy Morgan Date: Wed, 13 Feb 2019 13:11:27 -0500 Subject: [PATCH 2/9] Update preset icons to use same tag classes as map SVG --- css/30_highways.css | 20 ++-- css/40_railways.css | 4 - modules/svg/tag_classes.js | 198 +++++++++++++++++++------------------ modules/ui/preset_icon.js | 30 ++---- 4 files changed, 120 insertions(+), 132 deletions(-) diff --git a/css/30_highways.css b/css/30_highways.css index 4da6d1030..7c70ced90 100644 --- a/css/30_highways.css +++ b/css/30_highways.css @@ -33,7 +33,7 @@ path.line.stroke.tag-highway { } .preset-icon .icon.tag-highway-motorway, -.preset-icon .icon.tag-highway-motorway-link { +.preset-icon .icon.tag-highway-motorway_link { color: #CF2081; fill: #70372f; } @@ -49,7 +49,7 @@ path.line.casing.tag-motorway { } .preset-icon .icon.tag-highway-trunk, -.preset-icon .icon.tag-highway-trunk-link { +.preset-icon .icon.tag-highway-trunk_link { color: #DD2F22; fill: #70372f; } @@ -65,7 +65,7 @@ path.line.casing.tag-trunk { } .preset-icon .icon.tag-highway-primary, -.preset-icon .icon.tag-highway-primary-link { +.preset-icon .icon.tag-highway-primary_link { color: #F99806; fill: #70372f; } @@ -81,7 +81,7 @@ path.line.casing.tag-primary { } .preset-icon .icon.tag-highway-secondary, -.preset-icon .icon.tag-highway-secondary-link { +.preset-icon .icon.tag-highway-secondary_link { color: #F3F312; fill: #70372f; } @@ -97,7 +97,7 @@ path.line.casing.tag-secondary { } .preset-icon .icon.tag-highway-tertiary, -.preset-icon .icon.tag-highway-tertiary-link { +.preset-icon .icon.tag-highway-tertiary_link { color: #FFF9B3; fill: #70372f; } @@ -113,7 +113,7 @@ path.line.casing.tag-tertiary { } .legacy-carto .preset-icon .icon.tag-highway-motorway, -.legacy-carto .preset-icon .icon.tag-highway-motorway-link { +.legacy-carto .preset-icon .icon.tag-highway-motorway_link { color: #58a9ed; fill: #2c5476; } @@ -129,7 +129,7 @@ path.line.casing.tag-tertiary { } .legacy-carto .preset-icon .icon.tag-highway-trunk, -.legacy-carto .preset-icon .icon.tag-highway-trunk-link { +.legacy-carto .preset-icon .icon.tag-highway-trunk_link { color: #8cd05f; fill: #46682f; } @@ -145,7 +145,7 @@ path.line.casing.tag-tertiary { } .legacy-carto .preset-icon .icon.tag-highway-primary, -.legacy-carto .preset-icon .icon.tag-highway-primary-link { +.legacy-carto .preset-icon .icon.tag-highway-primary_link { color: #e06d5f; fill: #70372f; } @@ -161,7 +161,7 @@ path.line.casing.tag-tertiary { } .legacy-carto .preset-icon .icon.tag-highway-secondary, -.legacy-carto .preset-icon .icon.tag-highway-secondary-link { +.legacy-carto .preset-icon .icon.tag-highway-secondary_link { color: #eab056; fill: #75582b; } @@ -177,7 +177,7 @@ path.line.casing.tag-tertiary { } .legacy-carto .preset-icon .icon.tag-highway-tertiary, -.legacy-carto .preset-icon .icon.tag-highway-tertiary-link { +.legacy-carto .preset-icon .icon.tag-highway-tertiary_link { color: #ffff7e; fill: #7f7f3f; } diff --git a/css/40_railways.css b/css/40_railways.css index e8add8737..549f5c62d 100644 --- a/css/40_railways.css +++ b/css/40_railways.css @@ -59,10 +59,6 @@ path.line.stroke.tag-railway-abandoned { } -.preset-icon .icon.tag-railway-subway { - color: #222; - fill: #bbb; -} path.line.casing.tag-railway-subway { stroke: #222; } diff --git a/modules/svg/tag_classes.js b/modules/svg/tag_classes.js index 9d3b4a158..863f42d0f 100644 --- a/modules/svg/tag_classes.js +++ b/modules/svg/tag_classes.js @@ -23,111 +23,15 @@ export function svgTagClasses() { var tagClasses = function(selection) { selection.each(function tagClassesEach(entity) { var value = this.className; - var primary, status; if (value.baseVal !== undefined) { value = value.baseVal; } var t = _tags(entity); - var i, k, v; - // in some situations we want to render perimeter strokes a certain way - var overrideGeometry; - if (/\bstroke\b/.test(value)) { - if (!!t.barrier && t.barrier !== 'no') { - overrideGeometry = 'line'; - } else if (t.type === 'multipolygon' && !entity.hasInterestingTags()) { - overrideGeometry = 'area'; - } - } + var computed = tagClasses.getClassesString(t, value); - // preserve base classes (nothing with `tag-`) - var classes = value.trim().split(/\s+/) - .filter(function(klass) { - return klass.length && !/^tag-/.test(klass); - }) - .map(function(klass) { // special overrides for some perimeter strokes - return (klass === 'line' || klass === 'area') ? (overrideGeometry || klass) : klass; - }); - - - - // pick at most one primary classification tag.. - for (i = 0; i < primaries.length; i++) { - k = primaries[i]; - v = t[k]; - if (!v || v === 'no') continue; - - if (k === 'piste:type') { // avoid a ':' in the class name - k = 'piste'; - } - - primary = k; - if (statuses.indexOf(v) !== -1) { // e.g. `railway=abandoned` - status = v; - classes.push('tag-' + k); - } else { - classes.push('tag-' + k); - classes.push('tag-' + k + '-' + v); - } - - break; - } - - // add at most one status tag, only if relates to primary tag.. - if (!status) { - for (i = 0; i < statuses.length; i++) { - k = statuses[i]; - v = t[k]; - if (!v || v === 'no') continue; - - if (v === 'yes') { // e.g. `railway=rail + abandoned=yes` - status = k; - } - else if (primary && primary === v) { // e.g. `railway=rail + abandoned=railway` - status = k; - } else if (!primary && primaries.indexOf(v) !== -1) { // e.g. `abandoned=railway` - status = k; - primary = v; - classes.push('tag-' + v); - } // else ignore e.g. `highway=path + abandoned=railway` - - if (status) break; - } - } - - if (status) { - classes.push('tag-status'); - classes.push('tag-status-' + status); - } - - // add any secondary tags - for (i = 0; i < secondaries.length; i++) { - k = secondaries[i]; - v = t[k]; - if (!v || v === 'no') continue; - classes.push('tag-' + k); - classes.push('tag-' + k + '-' + v); - } - - // For highways, look for surface tagging.. - if (primary === 'highway' || primary === 'aeroway') { - var paved = (t.highway !== 'track'); - for (k in t) { - v = t[k]; - if (k in osmPavedTags) { - paved = !!osmPavedTags[k][v]; - break; - } - } - if (!paved) { - classes.push('tag-unpaved'); - } - } - - - var computed = classes.join(' ').trim(); if (computed !== value) { d3_select(this).attr('class', computed); } @@ -135,6 +39,106 @@ export function svgTagClasses() { }; + tagClasses.getClassesString = function(t, value) { + var primary, status; + var i, k, v; + + // in some situations we want to render perimeter strokes a certain way + var overrideGeometry; + if (/\bstroke\b/.test(value)) { + if (!!t.barrier && t.barrier !== 'no') { + overrideGeometry = 'line'; + } else if (t.type === 'multipolygon' && !entity.hasInterestingTags()) { + overrideGeometry = 'area'; + } + } + + // preserve base classes (nothing with `tag-`) + var classes = value.trim().split(/\s+/) + .filter(function(klass) { + return klass.length && !/^tag-/.test(klass); + }) + .map(function(klass) { // special overrides for some perimeter strokes + return (klass === 'line' || klass === 'area') ? (overrideGeometry || klass) : klass; + }); + + // pick at most one primary classification tag.. + for (i = 0; i < primaries.length; i++) { + k = primaries[i]; + v = t[k]; + if (!v || v === 'no') continue; + + if (k === 'piste:type') { // avoid a ':' in the class name + k = 'piste'; + } + + primary = k; + if (statuses.indexOf(v) !== -1) { // e.g. `railway=abandoned` + status = v; + classes.push('tag-' + k); + } else { + classes.push('tag-' + k); + classes.push('tag-' + k + '-' + v); + } + + break; + } + + // add at most one status tag, only if relates to primary tag.. + if (!status) { + for (i = 0; i < statuses.length; i++) { + k = statuses[i]; + v = t[k]; + if (!v || v === 'no') continue; + + if (v === 'yes') { // e.g. `railway=rail + abandoned=yes` + status = k; + } + else if (primary && primary === v) { // e.g. `railway=rail + abandoned=railway` + status = k; + } else if (!primary && primaries.indexOf(v) !== -1) { // e.g. `abandoned=railway` + status = k; + primary = v; + classes.push('tag-' + v); + } // else ignore e.g. `highway=path + abandoned=railway` + + if (status) break; + } + } + + if (status) { + classes.push('tag-status'); + classes.push('tag-status-' + status); + } + + // add any secondary tags + for (i = 0; i < secondaries.length; i++) { + k = secondaries[i]; + v = t[k]; + if (!v || v === 'no') continue; + classes.push('tag-' + k); + classes.push('tag-' + k + '-' + v); + } + + // For highways, look for surface tagging.. + if (primary === 'highway' || primary === 'aeroway') { + var paved = (t.highway !== 'track'); + for (k in t) { + v = t[k]; + if (k in osmPavedTags) { + paved = !!osmPavedTags[k][v]; + break; + } + } + if (!paved) { + classes.push('tag-unpaved'); + } + } + + return classes.join(' ').trim(); + } + + tagClasses.tags = function(val) { if (!arguments.length) return _tags; _tags = val; diff --git a/modules/ui/preset_icon.js b/modules/ui/preset_icon.js index a241049fc..e821961a9 100644 --- a/modules/ui/preset_icon.js +++ b/modules/ui/preset_icon.js @@ -1,9 +1,8 @@ import { select as d3_select } from 'd3-selection'; -import { svgIcon } from '../svg'; +import { svgIcon, svgTagClasses } from '../svg'; import { utilFunctor } from '../util'; - export function uiPresetIcon() { var preset, geometry; @@ -38,24 +37,13 @@ export function uiPresetIcon() { var drawLine = geom === 'line' && !isCategory; var isFramed = (geom === 'area' || drawLine || geom === 'vertex'); - var tagClasses = ''; - var tags = isCategory ? p.tags : p.setTags({}, geom); + var tags = !isCategory ? p.setTags({}, geom) : {}; for (var k in tags) { - if (k === 'piste:type') { // avoid a ':' in the class name - k = 'piste'; - } - var v = tags[k]; - tagClasses += ' tag-' + k; - if (v !== '*') { - tagClasses += ' tag-' + k + '-' + v; + if (tags[k] === '*') { + tags[k] = 'yes'; } } - - // if the preset includes a `building_area` field, class it as a building - if (p.fields && p.fields.filter(function(d) { return d.id === 'building_area'; }).length) { - tagClasses += ' tag-building'; - } - + var tagClasses = svgTagClasses().getClassesString(tags, ''); var fill = selection.selectAll('.preset-icon-fill') .data([0]); @@ -66,7 +54,7 @@ export function uiPresetIcon() { fill .attr('class', function() { - return 'preset-icon-fill preset-icon-fill-' + geom + tagClasses; + return 'preset-icon-fill preset-icon-fill-' + geom + ' ' + tagClasses; }); var line = selection.selectAll('.preset-icon-line') @@ -86,10 +74,10 @@ export function uiPresetIcon() { line.append('path') .attr('d', 'M0 13.5 L40 13.5') - .attr('class', 'line casing' + tagClasses); + .attr('class', 'line casing ' + tagClasses); line.append('path') .attr('d', 'M0 13.5 L40 13.5') - .attr('class', 'line stroke' + tagClasses); + .attr('class', 'line stroke ' + tagClasses); var areaFrame = selection.selectAll('.preset-icon-frame') @@ -120,7 +108,7 @@ export function uiPresetIcon() { icon.selectAll('svg') .attr('class', function() { - return 'icon ' + picon + (isPOI && geom !== 'line' ? '' : tagClasses); + return 'icon ' + picon + ' ' + (isPOI && geom !== 'line' ? '' : tagClasses); }); icon.selectAll('use') From 09ec7ea80229e91237fccd78da6dea2fc877008e Mon Sep 17 00:00:00 2001 From: Quincy Morgan Date: Wed, 13 Feb 2019 13:28:34 -0500 Subject: [PATCH 3/9] Remove redundant line preset icons Fix lint errors --- css/20_map.css | 4 +--- data/presets/presets.json | 6 +++--- data/presets/presets/highway/path.json | 2 +- data/presets/presets/highway/road.json | 2 +- data/presets/presets/leisure/track.json | 2 +- data/taginfo.json | 6 +++--- modules/svg/tag_classes.js | 6 +++--- svg/iD-sprite/presets/highway-path.svg | 5 ----- svg/iD-sprite/presets/highway-road.svg | 5 ----- svg/iD-sprite/presets/other-line.svg | 2 +- 10 files changed, 14 insertions(+), 26 deletions(-) delete mode 100644 svg/iD-sprite/presets/highway-path.svg delete mode 100644 svg/iD-sprite/presets/highway-road.svg diff --git a/css/20_map.css b/css/20_map.css index 559b3ae72..e316573a5 100644 --- a/css/20_map.css +++ b/css/20_map.css @@ -177,8 +177,7 @@ g.vertex.selected .shadow { /* lines */ .preset-icon .icon.iD-other-line { - color: #fff; - fill: #777; + color: #989898; } path.line { @@ -322,4 +321,3 @@ g.vertex.highlighted .shadow { .surface.tr g.vertex.related.only .shadow { stroke: #68f; } - diff --git a/data/presets/presets.json b/data/presets/presets.json index 41f4811a2..e8b274052 100644 --- a/data/presets/presets.json +++ b/data/presets/presets.json @@ -432,7 +432,7 @@ "highway/motorway_link": {"icon": "iD-highway-motorway-link", "fields": ["destination_oneway", "destination/ref_oneway", "junction/ref_oneway", "oneway", "maxspeed", "lanes", "surface", "structure", "access"], "moreFields": ["covered", "destination/symbol_oneway", "lit", "maxheight", "maxspeed/advisory", "name", "ref_road_number", "smoothness", "toll"], "geometry": ["line"], "tags": {"highway": "motorway_link"}, "addTags": {"highway": "motorway_link", "oneway": "yes"}, "removeTags": {"highway": "motorway_link", "oneway": "yes"}, "terms": ["exit", "ramp", "road", "street", "on ramp", "off ramp"], "name": "Motorway Link"}, "highway/motorway": {"icon": "iD-highway-motorway", "fields": ["name", "ref_road_number", "oneway_yes", "maxspeed", "lanes", "surface", "structure", "access"], "moreFields": ["toll", "maxheight", "covered", "lit", "smoothness", "minspeed"], "geometry": ["line"], "tags": {"highway": "motorway"}, "terms": ["autobahn", "expressway", "freeway", "highway", "interstate", "parkway", "road", "street", "thruway", "turnpike"], "name": "Motorway"}, "highway/passing_place": {"icon": "maki-circle-stroked", "geometry": ["vertex"], "tags": {"highway": "passing_place"}, "terms": ["turnout, pullout"], "name": "Passing Place"}, - "highway/path": {"icon": "iD-highway-path", "fields": ["name", "surface", "width", "structure", "access", "incline"], "moreFields": ["wheelchair", "lit", "smoothness", "trail_visibility", "sac_scale", "mtb/scale", "mtb/scale/uphill", "mtb/scale/imba", "horse_scale", "covered", "ref", "dog"], "geometry": ["line"], "terms": ["hike", "hiking", "trackway", "trail", "walk"], "tags": {"highway": "path"}, "name": "Path"}, + "highway/path": {"icon": "iD-other-line", "fields": ["name", "surface", "width", "structure", "access", "incline"], "moreFields": ["wheelchair", "lit", "smoothness", "trail_visibility", "sac_scale", "mtb/scale", "mtb/scale/uphill", "mtb/scale/imba", "horse_scale", "covered", "ref", "dog"], "geometry": ["line"], "terms": ["hike", "hiking", "trackway", "trail", "walk"], "tags": {"highway": "path"}, "name": "Path"}, "highway/pedestrian_area": {"icon": "temaki-pedestrian", "fields": ["name", "surface", "lit", "width", "structure", "access"], "geometry": ["area"], "tags": {"highway": "pedestrian", "area": "yes"}, "terms": ["center", "centre", "plaza", "quad", "square", "walkway"], "name": "Pedestrian Area"}, "highway/pedestrian_line": {"icon": "temaki-pedestrian", "fields": ["name", "surface", "lit", "width", "oneway", "structure", "access"], "moreFields": ["covered", "smoothness"], "geometry": ["line"], "tags": {"highway": "pedestrian"}, "terms": ["center", "centre", "plaza", "quad", "square", "walkway"], "name": "Pedestrian Street"}, "highway/primary_link": {"icon": "iD-highway-primary-link", "fields": ["destination_oneway", "destination/ref_oneway", "oneway", "maxspeed", "lanes", "surface", "structure", "access"], "moreFields": ["covered", "cycleway", "destination/symbol_oneway", "junction/ref_oneway", "lit", "maxheight", "maxspeed/advisory", "name", "oneway/bicycle", "ref_road_number", "smoothness", "toll"], "geometry": ["line"], "tags": {"highway": "primary_link"}, "terms": ["on ramp", "off ramp", "ramp", "road", "street"], "name": "Primary Link"}, @@ -440,7 +440,7 @@ "highway/raceway": {"icon": "iD-highway-unclassified", "fields": ["name", "oneway", "surface", "sport_racing_motor", "lit", "width", "lanes", "structure"], "geometry": ["point", "line", "area"], "tags": {"highway": "raceway"}, "addTags": {"highway": "raceway", "sport": "motor"}, "terms": ["auto*", "formula one", "kart", "motocross", "nascar", "race*", "track"], "name": "Racetrack (Motorsport)"}, "highway/residential": {"icon": "iD-highway-residential", "fields": ["name", "oneway", "maxspeed", "lanes", "surface", "structure", "access"], "moreFields": ["covered", "cycleway", "lit", "oneway/bicycle", "maxheight", "maxspeed/advisory", "smoothness"], "geometry": ["line"], "tags": {"highway": "residential"}, "terms": ["road", "street"], "name": "Residential Road"}, "highway/rest_area": {"icon": "maki-car", "fields": ["name", "operator", "opening_hours"], "moreFields": ["address", "website", "phone", "email", "fax", "wheelchair"], "geometry": ["point", "vertex", "area"], "tags": {"highway": "rest_area"}, "terms": ["rest stop"], "name": "Rest Area"}, - "highway/road": {"icon": "iD-highway-road", "fields": ["{highway/residential}"], "moreFields": ["{highway/residential}"], "geometry": ["line"], "tags": {"highway": "road"}, "terms": ["road", "street"], "name": "Unknown Road"}, + "highway/road": {"icon": "iD-other-line", "fields": ["{highway/residential}"], "moreFields": ["{highway/residential}"], "geometry": ["line"], "tags": {"highway": "road"}, "terms": ["road", "street"], "name": "Unknown Road"}, "highway/secondary_link": {"icon": "iD-highway-secondary-link", "fields": ["{highway/primary_link}"], "moreFields": ["{highway/primary_link}"], "geometry": ["line"], "tags": {"highway": "secondary_link"}, "terms": ["on ramp", "off ramp", "ramp", "road", "street"], "name": "Secondary Link"}, "highway/secondary": {"icon": "iD-highway-secondary", "fields": ["{highway/primary}"], "moreFields": ["{highway/primary}"], "geometry": ["line"], "tags": {"highway": "secondary"}, "terms": ["road", "street"], "name": "Secondary Road"}, "highway/service": {"icon": "iD-highway-service", "fields": ["name", "service", "oneway", "maxspeed", "surface", "structure", "access"], "moreFields": ["covered", "lanes", "lit", "maxheight", "maxspeed/advisory", "oneway/bicycle"], "geometry": ["line"], "tags": {"highway": "service"}, "terms": ["road", "street"], "name": "Service Road"}, @@ -594,7 +594,7 @@ "leisure/sports_centre/swimming": {"icon": "maki-swimming", "geometry": ["point", "area"], "terms": ["dive", "water"], "tags": {"leisure": "sports_centre", "sport": "swimming"}, "reference": {"key": "sport", "value": "swimming"}, "name": "Swimming Pool Facility"}, "leisure/stadium": {"icon": "maki-pitch", "fields": ["name", "sport", "address"], "moreFields": ["website", "phone", "email", "fax"], "geometry": ["point", "area"], "tags": {"leisure": "stadium"}, "name": "Stadium"}, "leisure/swimming_pool": {"icon": "maki-swimming", "fields": ["name", "access_simple", "lit", "location_pool", "length", "swimming_pool"], "moreFields": ["operator", "address"], "geometry": ["point", "area"], "terms": ["dive", "water", "aquatics"], "tags": {"leisure": "swimming_pool"}, "name": "Swimming Pool"}, - "leisure/track": {"icon": "iD-highway-road", "fields": ["surface", "sport_racing_nonmotor", "lit", "width", "lanes"], "geometry": ["point", "line", "area"], "tags": {"leisure": "track"}, "terms": ["cycle", "dog", "greyhound", "horse", "race*", "track"], "name": "Racetrack (Non-Motorsport)"}, + "leisure/track": {"icon": "iD-other-line", "fields": ["surface", "sport_racing_nonmotor", "lit", "width", "lanes"], "geometry": ["point", "line", "area"], "tags": {"leisure": "track"}, "terms": ["cycle", "dog", "greyhound", "horse", "race*", "track"], "name": "Racetrack (Non-Motorsport)"}, "leisure/track/horse_racing": {"icon": "maki-horse-riding", "fields": ["surface", "sport_racing_nonmotor", "lit", "width", "lanes"], "geometry": ["point", "line", "area"], "tags": {"leisure": "track", "sport": "horse_racing"}, "terms": ["race*", "horse", "track"], "name": "Racetrack (Horse Racing)"}, "leisure/track/running": {"icon": "maki-pitch", "fields": ["surface", "sport_racing_nonmotor", "lit", "width", "lanes"], "geometry": ["point", "line", "area"], "tags": {"leisure": "track", "sport": "running"}, "terms": ["race*", "running", "sprint", "track"], "name": "Racetrack (Running)"}, "leisure/water_park": {"icon": "maki-swimming", "fields": ["name", "operator", "address"], "moreFields": ["payment_multi", "brand", "website", "phone", "email", "fax"], "geometry": ["point", "area"], "terms": ["swim", "pool", "dive"], "tags": {"leisure": "water_park"}, "name": "Water Park"}, diff --git a/data/presets/presets/highway/path.json b/data/presets/presets/highway/path.json index 72484aac9..446ff8596 100644 --- a/data/presets/presets/highway/path.json +++ b/data/presets/presets/highway/path.json @@ -1,5 +1,5 @@ { - "icon": "iD-highway-path", + "icon": "iD-other-line", "fields": [ "name", "surface", diff --git a/data/presets/presets/highway/road.json b/data/presets/presets/highway/road.json index ddb81396d..b114b2b64 100644 --- a/data/presets/presets/highway/road.json +++ b/data/presets/presets/highway/road.json @@ -1,5 +1,5 @@ { - "icon": "iD-highway-road", + "icon": "iD-other-line", "fields": [ "{highway/residential}" ], diff --git a/data/presets/presets/leisure/track.json b/data/presets/presets/leisure/track.json index b3e037f63..26172660d 100644 --- a/data/presets/presets/leisure/track.json +++ b/data/presets/presets/leisure/track.json @@ -1,5 +1,5 @@ { - "icon": "iD-highway-road", + "icon": "iD-other-line", "fields": [ "surface", "sport_racing_nonmotor", diff --git a/data/taginfo.json b/data/taginfo.json index 88f5c1ed0..e35033142 100644 --- a/data/taginfo.json +++ b/data/taginfo.json @@ -420,14 +420,14 @@ {"key": "highway", "value": "motorway_link", "description": "🄿 Motorway Link", "object_types": ["way"], "icon_url": "https://raw.githubusercontent.com/openstreetmap/iD/master/svg/iD-sprite/presets/highway-motorway-link.svg?sanitize=true"}, {"key": "highway", "value": "motorway", "description": "🄿 Motorway", "object_types": ["way"], "icon_url": "https://raw.githubusercontent.com/openstreetmap/iD/master/svg/iD-sprite/presets/highway-motorway.svg?sanitize=true"}, {"key": "highway", "value": "passing_place", "description": "🄿 Passing Place", "object_types": ["node"], "icon_url": "https://raw.githubusercontent.com/mapbox/maki/master/icons/circle-stroked-15.svg?sanitize=true"}, - {"key": "highway", "value": "path", "description": "🄿 Path", "object_types": ["way"], "icon_url": "https://raw.githubusercontent.com/openstreetmap/iD/master/svg/iD-sprite/presets/highway-path.svg?sanitize=true"}, + {"key": "highway", "value": "path", "description": "🄿 Path", "object_types": ["way"], "icon_url": "https://raw.githubusercontent.com/openstreetmap/iD/master/svg/iD-sprite/presets/other-line.svg?sanitize=true"}, {"key": "highway", "value": "pedestrian", "description": "🄿 Pedestrian Street", "object_types": ["way"], "icon_url": "https://raw.githubusercontent.com/bhousel/temaki/master/icons/pedestrian.svg?sanitize=true"}, {"key": "highway", "value": "primary_link", "description": "🄿 Primary Link", "object_types": ["way"], "icon_url": "https://raw.githubusercontent.com/openstreetmap/iD/master/svg/iD-sprite/presets/highway-primary-link.svg?sanitize=true"}, {"key": "highway", "value": "primary", "description": "🄿 Primary Road", "object_types": ["way"], "icon_url": "https://raw.githubusercontent.com/openstreetmap/iD/master/svg/iD-sprite/presets/highway-primary.svg?sanitize=true"}, {"key": "highway", "value": "raceway", "description": "🄿 Racetrack (Motorsport)", "object_types": ["node", "way", "area"], "icon_url": "https://raw.githubusercontent.com/openstreetmap/iD/master/svg/iD-sprite/presets/highway-unclassified.svg?sanitize=true"}, {"key": "highway", "value": "residential", "description": "🄿 Residential Road", "object_types": ["way"], "icon_url": "https://raw.githubusercontent.com/openstreetmap/iD/master/svg/iD-sprite/presets/highway-residential.svg?sanitize=true"}, {"key": "highway", "value": "rest_area", "description": "🄿 Rest Area", "object_types": ["node", "area"], "icon_url": "https://raw.githubusercontent.com/mapbox/maki/master/icons/car-15.svg?sanitize=true"}, - {"key": "highway", "value": "road", "description": "🄿 Unknown Road", "object_types": ["way"], "icon_url": "https://raw.githubusercontent.com/openstreetmap/iD/master/svg/iD-sprite/presets/highway-road.svg?sanitize=true"}, + {"key": "highway", "value": "road", "description": "🄿 Unknown Road", "object_types": ["way"], "icon_url": "https://raw.githubusercontent.com/openstreetmap/iD/master/svg/iD-sprite/presets/other-line.svg?sanitize=true"}, {"key": "highway", "value": "secondary_link", "description": "🄿 Secondary Link", "object_types": ["way"], "icon_url": "https://raw.githubusercontent.com/openstreetmap/iD/master/svg/iD-sprite/presets/highway-secondary-link.svg?sanitize=true"}, {"key": "highway", "value": "secondary", "description": "🄿 Secondary Road", "object_types": ["way"], "icon_url": "https://raw.githubusercontent.com/openstreetmap/iD/master/svg/iD-sprite/presets/highway-secondary.svg?sanitize=true"}, {"key": "highway", "value": "service", "description": "🄿 Service Road", "object_types": ["way"], "icon_url": "https://raw.githubusercontent.com/openstreetmap/iD/master/svg/iD-sprite/presets/highway-service.svg?sanitize=true"}, @@ -579,7 +579,7 @@ {"key": "sport", "value": "swimming", "description": "🄿 Swimming Pool Facility", "object_types": ["node", "area"], "icon_url": "https://raw.githubusercontent.com/mapbox/maki/master/icons/swimming-15.svg?sanitize=true"}, {"key": "leisure", "value": "stadium", "description": "🄿 Stadium", "object_types": ["node", "area"], "icon_url": "https://raw.githubusercontent.com/mapbox/maki/master/icons/pitch-15.svg?sanitize=true"}, {"key": "leisure", "value": "swimming_pool", "description": "🄿 Swimming Pool", "object_types": ["node", "area"], "icon_url": "https://raw.githubusercontent.com/mapbox/maki/master/icons/swimming-15.svg?sanitize=true"}, - {"key": "leisure", "value": "track", "description": "🄿 Racetrack (Non-Motorsport)", "object_types": ["node", "way", "area"], "icon_url": "https://raw.githubusercontent.com/openstreetmap/iD/master/svg/iD-sprite/presets/highway-road.svg?sanitize=true"}, + {"key": "leisure", "value": "track", "description": "🄿 Racetrack (Non-Motorsport)", "object_types": ["node", "way", "area"], "icon_url": "https://raw.githubusercontent.com/openstreetmap/iD/master/svg/iD-sprite/presets/other-line.svg?sanitize=true"}, {"key": "sport", "value": "horse_racing", "description": "🄿 Racetrack (Horse Racing)", "object_types": ["node", "way", "area"], "icon_url": "https://raw.githubusercontent.com/mapbox/maki/master/icons/horse-riding-15.svg?sanitize=true"}, {"key": "sport", "value": "running", "description": "🄿 Racetrack (Running)", "object_types": ["node", "way", "area"], "icon_url": "https://raw.githubusercontent.com/mapbox/maki/master/icons/pitch-15.svg?sanitize=true"}, {"key": "leisure", "value": "water_park", "description": "🄿 Water Park", "object_types": ["node", "area"], "icon_url": "https://raw.githubusercontent.com/mapbox/maki/master/icons/swimming-15.svg?sanitize=true"}, diff --git a/modules/svg/tag_classes.js b/modules/svg/tag_classes.js index 863f42d0f..42b211953 100644 --- a/modules/svg/tag_classes.js +++ b/modules/svg/tag_classes.js @@ -30,7 +30,7 @@ export function svgTagClasses() { var t = _tags(entity); - var computed = tagClasses.getClassesString(t, value); + var computed = tagClasses.getClassesString(t, value, entity); if (computed !== value) { d3_select(this).attr('class', computed); @@ -39,7 +39,7 @@ export function svgTagClasses() { }; - tagClasses.getClassesString = function(t, value) { + tagClasses.getClassesString = function(t, value, entity) { var primary, status; var i, k, v; @@ -136,7 +136,7 @@ export function svgTagClasses() { } return classes.join(' ').trim(); - } + }; tagClasses.tags = function(val) { diff --git a/svg/iD-sprite/presets/highway-path.svg b/svg/iD-sprite/presets/highway-path.svg deleted file mode 100644 index df21a8604..000000000 --- a/svg/iD-sprite/presets/highway-path.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/svg/iD-sprite/presets/highway-road.svg b/svg/iD-sprite/presets/highway-road.svg deleted file mode 100644 index 02e90859e..000000000 --- a/svg/iD-sprite/presets/highway-road.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/svg/iD-sprite/presets/other-line.svg b/svg/iD-sprite/presets/other-line.svg index 02e90859e..dcce51841 100644 --- a/svg/iD-sprite/presets/other-line.svg +++ b/svg/iD-sprite/presets/other-line.svg @@ -1,5 +1,5 @@ - + From a3099fadf5e72e7589bd211246e4af3a0b68914a Mon Sep 17 00:00:00 2001 From: Quincy Morgan Date: Wed, 13 Feb 2019 14:18:36 -0500 Subject: [PATCH 4/9] Tweak line preset icon css --- css/50_misc.css | 2 +- css/80_app.css | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/css/50_misc.css b/css/50_misc.css index 8c8ad1c3b..b1c9b2011 100644 --- a/css/50_misc.css +++ b/css/50_misc.css @@ -352,7 +352,7 @@ path.line.casing.tag-status { } /* Road Closed Status */ -.preset-icon .icon.tag-highway-construction { +.preset-icon .icon.tag-highway.tag-status-construction { color: #fc6c14; fill: #fff; } diff --git a/css/80_app.css b/css/80_app.css index a084a399d..fdd2bac64 100644 --- a/css/80_app.css +++ b/css/80_app.css @@ -954,13 +954,16 @@ a.hide-toggle { left: 10px; top: 30px; } +.preset-icon-line path.line { + cursor: inherit; +} /* use a consistent stroke width */ .preset-icon-line path.line.stroke { stroke-width: 2 !important; } .preset-icon-line path.line.casing { - stroke-width: 4 !important; + stroke-width: 3.5 !important; } .preset-icon-fill-area { From 1e7d37c54a1ddcccbe83bb2f75b22973dd99c97d Mon Sep 17 00:00:00 2001 From: Quincy Morgan Date: Wed, 13 Feb 2019 15:41:01 -0500 Subject: [PATCH 5/9] Make preset icon lines visible on the light background --- css/20_map.css | 3 +++ css/25_areas.css | 6 ++++-- css/30_highways.css | 27 ++++++++++++++++++++++----- css/50_misc.css | 26 ++++++++++++++++++++------ 4 files changed, 49 insertions(+), 13 deletions(-) diff --git a/css/20_map.css b/css/20_map.css index e316573a5..d5e7b0e24 100644 --- a/css/20_map.css +++ b/css/20_map.css @@ -179,6 +179,9 @@ g.vertex.selected .shadow { .preset-icon .icon.iD-other-line { color: #989898; } +.preset-icon-line path.casing { + stroke: #afafaf; +} path.line { stroke-linecap: round; diff --git a/css/25_areas.css b/css/25_areas.css index 7e6d9f41a..a2e469f64 100644 --- a/css/25_areas.css +++ b/css/25_areas.css @@ -33,7 +33,8 @@ path.stroke.tag-leisure-garden, path.stroke.tag-leisure-park, path.stroke.tag-landuse-forest, path.stroke.tag-landuse-wood, -path.stroke.tag-landuse-grass { +path.stroke.tag-landuse-grass, +path.stroke.tag-barrier-hedge { stroke: rgb(140, 208, 95); } path.fill.tag-landuse, @@ -46,7 +47,8 @@ path.fill.tag-leisure-garden, path.fill.tag-leisure-park, path.fill.tag-landuse-forest, path.fill.tag-natural-wood, -path.fill.tag-landuse-grass { +path.fill.tag-landuse-grass, +path.fill.tag-barrier-hedge { stroke: rgba(140, 208, 95, 0.3); fill: rgba(140, 208, 95, 0.3); } diff --git a/css/30_highways.css b/css/30_highways.css index 7c70ced90..7630289be 100644 --- a/css/30_highways.css +++ b/css/30_highways.css @@ -535,35 +535,45 @@ path.line.stroke.tag-highway-path { color: #988; fill: #fff; } -path.line.stroke.tag-highway-footway { +path.line.stroke.tag-highway-footway, +.preset-icon-line path.casing.tag-highway-footway { stroke: #988; } - +.preset-icon-line path.stroke.tag-highway-footway { + stroke: #fff; +} .preset-icon .icon.tag-route-bicycle, .preset-icon .icon.tag-highway-cycleway { color: #58a9ed; fill: #fff; } -path.line.stroke.tag-highway-cycleway { +path.line.stroke.tag-highway-cycleway, +.preset-icon-line path.casing.tag-highway-cycleway { stroke: #58a9ed; } +.preset-icon-line path.stroke.tag-highway-cycleway { + stroke: #fff; +} .preset-icon .icon.tag-route-horse, .preset-icon .icon.tag-highway-bridleway { color: #e06d5f; fill: #fff; } -path.line.stroke.tag-highway-bridleway { +path.line.stroke.tag-highway-bridleway, +.preset-icon-line path.casing.tag-highway-bridleway { stroke: #e06d5f; } +.preset-icon-line path.stroke.tag-highway-bridleway { + stroke: #fff; +} .preset-icon .icon.tag-highway-steps { color: #81d25c; fill: #fff; } path.line.stroke.tag-highway-steps { - stroke: #81d25c; stroke-linecap: butt; stroke-dasharray: 3, 3; } @@ -576,6 +586,13 @@ path.line.casing.tag-highway-steps.tag-unpaved { stroke-linecap: round; stroke-dasharray: none; } +path.line.stroke.tag-highway-steps, +.preset-icon-line path.line.casing.tag-highway-steps { + stroke: #81d25c; +} +.preset-icon-line path.line.stroke.tag-highway-steps { + stroke: #fff; +} /* highway midpoints */ g.midpoint.tag-highway-corridor .fill, diff --git a/css/50_misc.css b/css/50_misc.css index b1c9b2011..8d36f87df 100644 --- a/css/50_misc.css +++ b/css/50_misc.css @@ -80,6 +80,9 @@ path.line.stroke.tag-route-ferry { path.line.stroke.tag-route-ferry { stroke: #58a9ed; } +path.line.casing.tag-route-ferry { + stroke: none; +} /* aerialways */ @@ -180,13 +183,18 @@ path.line.casing.tag-boundary-national_park { /* barriers and similar */ -path.line.stroke.tag-barrier { +path.line.stroke.tag-barrier:not(.tag-barrier-hedge) { stroke: #ddd; } -path.line.stroke.tag-barrier-hedge { - stroke: rgb(140, 208, 95); +.preset-icon-line path.line.stroke.tag-barrier:not(.tag-barrier-hedge) { + stroke: rgb(170, 170, 170); +} +path.line.casing.tag-natural, +path.line.casing.tag-barrier, +path.line.casing.tag-man_made-groyne, +path.line.casing.tag-man_made-breakwater { + stroke: none; } - path.line.stroke.tag-barrier, path.line.stroke.tag-man_made-groyne, path.line.stroke.tag-man_made-breakwater { @@ -360,17 +368,23 @@ path.line.shadow.tag-status.tag-status-construction { stroke-width: 20; } path.line.casing.tag-status.tag-status-construction { - stroke: #fff; stroke-width: 10; stroke-linecap: butt; stroke-dasharray: none } path.line.stroke.tag-status.tag-status-construction { - stroke: #fc6c14; stroke-width: 8; stroke-linecap: butt; stroke-dasharray: 10, 10; } +path.line.casing.tag-status.tag-status-construction, +.preset-icon-line path.line.stroke.tag-status.tag-status-construction { + stroke: #fff; +} +path.line.stroke.tag-status.tag-status-construction, +.preset-icon-line path.line.casing.tag-status.tag-status-construction { + stroke: #fc6c14; +} .low-zoom path.line.shadow.tag-status.tag-status-construction { stroke-width: 16; } From ed95fafac90dbec89f4414d828d542b8a47ad8ff Mon Sep 17 00:00:00 2001 From: Quincy Morgan Date: Wed, 13 Feb 2019 16:12:29 -0500 Subject: [PATCH 6/9] Add endpoint vertices to the preset icon line --- css/80_app.css | 22 +++++++++++++++++++++- modules/ui/preset_icon.js | 18 +++++++++++++----- 2 files changed, 34 insertions(+), 6 deletions(-) diff --git a/css/80_app.css b/css/80_app.css index fdd2bac64..7f92de993 100644 --- a/css/80_app.css +++ b/css/80_app.css @@ -951,8 +951,13 @@ a.hide-toggle { .preset-icon-line { margin: auto; position: absolute; - left: 10px; + left: 8px; top: 30px; + width: 44px; +} +.preset-icon-line svg { + left: 2px; + right: 2px; } .preset-icon-line path.line { cursor: inherit; @@ -965,6 +970,21 @@ a.hide-toggle { .preset-icon-line path.line.casing { stroke-width: 3.5 !important; } +.preset-icon-line .vertex { + width: 6px; + height: 6px; + background: #fff; + border-radius: 50%; + border: 1px solid rgba(0, 0, 0, 0.25); + position: absolute; + top: 10.5px; +} +.preset-icon-line .vertex.vertex-left { + left: 0; +} +.preset-icon-line .vertex.vertex-right { + right: 0; +} .preset-icon-fill-area { cursor: inherit; diff --git a/modules/ui/preset_icon.js b/modules/ui/preset_icon.js index e821961a9..db716e5a0 100644 --- a/modules/ui/preset_icon.js +++ b/modules/ui/preset_icon.js @@ -64,18 +64,26 @@ export function uiPresetIcon() { .remove(); line = line.enter() - .append('svg') + .append('div') .attr('class', 'preset-icon-line') - .attr('width', 40) - .attr('height', 30) .merge(line); line.html(''); - line.append('path') + line.append('div') + .attr('class', 'vertex vertex-left'); + line.append('div') + .attr('class', 'vertex vertex-right'); + + var lineSvg = line.append('svg') + .attr('width', 40) + .attr('height', 20) + .merge(line); + + lineSvg.append('path') .attr('d', 'M0 13.5 L40 13.5') .attr('class', 'line casing ' + tagClasses); - line.append('path') + lineSvg.append('path') .attr('d', 'M0 13.5 L40 13.5') .attr('class', 'line stroke ' + tagClasses); From d63430e66a9ff8df7dd09e6227911172222f654e Mon Sep 17 00:00:00 2001 From: Quincy Morgan Date: Thu, 14 Feb 2019 09:40:17 -0500 Subject: [PATCH 7/9] Line preset icons: - Render vertices with SVG - Add viewBox to SVG - Don't reload static parts of the SVG on every update - Use dimensions that are friendly for low-res displays - Use nicer-looking stroke dash patterns for ferry routes and railways --- css/40_railways.css | 4 +++- css/50_misc.css | 3 ++- css/80_app.css | 31 ++++++-------------------- modules/ui/preset_icon.js | 47 ++++++++++++++++++++++++--------------- 4 files changed, 41 insertions(+), 44 deletions(-) diff --git a/css/40_railways.css b/css/40_railways.css index 549f5c62d..dbaf2d602 100644 --- a/css/40_railways.css +++ b/css/40_railways.css @@ -33,7 +33,9 @@ path.line.stroke.tag-railway { stroke-width: 2; stroke-dasharray: 6,6; } - +.preset-icon-line path.line.stroke.tag-railway:not(.tag-status) { + stroke-dasharray: 6; +} /* styles */ path.line.casing.tag-railway { diff --git a/css/50_misc.css b/css/50_misc.css index 8d36f87df..b827f3f09 100644 --- a/css/50_misc.css +++ b/css/50_misc.css @@ -73,7 +73,8 @@ path.line.stroke.tag-route-ferry { .low-zoom path.line.shadow.tag-route-ferry { stroke-width: 12; } -.low-zoom path.line.stroke.tag-route-ferry { +.low-zoom path.line.stroke.tag-route-ferry, +.preset-icon-line path.line.stroke.tag-route-ferry { stroke-width: 2; stroke-dasharray: 6,4; } diff --git a/css/80_app.css b/css/80_app.css index 7f92de993..13302f685 100644 --- a/css/80_app.css +++ b/css/80_app.css @@ -951,39 +951,22 @@ a.hide-toggle { .preset-icon-line { margin: auto; position: absolute; - left: 8px; - top: 30px; - width: 44px; -} -.preset-icon-line svg { - left: 2px; - right: 2px; + left: 0; + top: 0; } .preset-icon-line path.line { cursor: inherit; } - +.preset-icon-line circle.vertex { + fill: #fff; + stroke: rgba(0, 0, 0, 0.25); +} /* use a consistent stroke width */ .preset-icon-line path.line.stroke { stroke-width: 2 !important; } .preset-icon-line path.line.casing { - stroke-width: 3.5 !important; -} -.preset-icon-line .vertex { - width: 6px; - height: 6px; - background: #fff; - border-radius: 50%; - border: 1px solid rgba(0, 0, 0, 0.25); - position: absolute; - top: 10.5px; -} -.preset-icon-line .vertex.vertex-left { - left: 0; -} -.preset-icon-line .vertex.vertex-right { - right: 0; + stroke-width: 4 !important; } .preset-icon-fill-area { diff --git a/modules/ui/preset_icon.js b/modules/ui/preset_icon.js index db716e5a0..e2134cbde 100644 --- a/modules/ui/preset_icon.js +++ b/modules/ui/preset_icon.js @@ -63,29 +63,40 @@ export function uiPresetIcon() { line.exit() .remove(); - line = line.enter() - .append('div') + // draw the line parametrically + var w = 60, h = 60, y = 43, l = 38, r = 3; + var x1 = (w - l)/2, x2 = x1 + l; + + var lineEnter = line.enter() + .append('svg') .attr('class', 'preset-icon-line') - .merge(line); + .attr('width', w) + .attr('height', h) + .attr('viewBox', '0 0 ' + w + ' ' + h); - line.html(''); + lineEnter.append('path') + .attr('d', 'M' + x1 + ' ' + y + ' L' + x2 + ' ' + y) + .attr('class', 'line casing'); + lineEnter.append('path') + .attr('d', 'M' + x1 + ' ' + y + ' L' + x2 + ' ' + y) + .attr('class', 'line stroke'); + lineEnter.append('circle') + .attr('class', 'vertex') + .attr('cx', x1) + .attr('cy', y) + .attr('r', r); + lineEnter.append('circle') + .attr('class', 'vertex') + .attr('cx', x2) + .attr('cy', y) + .attr('r', r); - line.append('div') - .attr('class', 'vertex vertex-left'); - line.append('div') - .attr('class', 'vertex vertex-right'); + line = lineEnter.merge(line); - var lineSvg = line.append('svg') - .attr('width', 40) - .attr('height', 20) - .merge(line); - - lineSvg.append('path') - .attr('d', 'M0 13.5 L40 13.5') - .attr('class', 'line casing ' + tagClasses); - lineSvg.append('path') - .attr('d', 'M0 13.5 L40 13.5') + line.selectAll('path.stroke') .attr('class', 'line stroke ' + tagClasses); + line.selectAll('path.casing') + .attr('class', 'line casing ' + tagClasses); var areaFrame = selection.selectAll('.preset-icon-frame') From d0c29f8554724c2519193f36388f0e4aaf655866 Mon Sep 17 00:00:00 2001 From: Quincy Morgan Date: Thu, 14 Feb 2019 10:06:50 -0500 Subject: [PATCH 8/9] Tweak line icon display --- css/50_misc.css | 5 +++++ modules/ui/preset_icon.js | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/css/50_misc.css b/css/50_misc.css index b827f3f09..67492596d 100644 --- a/css/50_misc.css +++ b/css/50_misc.css @@ -210,6 +210,11 @@ path.line.stroke.tag-man_made-breakwater { stroke-linecap: butt; stroke-dasharray: 8, 2, 2, 2; } +.preset-icon-line path.line.stroke.tag-barrier, +.preset-icon-line path.line.stroke.tag-man_made-groyne, +.preset-icon-line path.line.stroke.tag-man_made-breakwater { + stroke-dasharray: 1, 4, 6, 4; +} /* bridges */ diff --git a/modules/ui/preset_icon.js b/modules/ui/preset_icon.js index e2134cbde..505fcebe8 100644 --- a/modules/ui/preset_icon.js +++ b/modules/ui/preset_icon.js @@ -64,7 +64,7 @@ export function uiPresetIcon() { .remove(); // draw the line parametrically - var w = 60, h = 60, y = 43, l = 38, r = 3; + var w = 60, h = 60, y = 43, l = 36, r = 2.5; var x1 = (w - l)/2, x2 = x1 + l; var lineEnter = line.enter() @@ -82,12 +82,12 @@ export function uiPresetIcon() { .attr('class', 'line stroke'); lineEnter.append('circle') .attr('class', 'vertex') - .attr('cx', x1) + .attr('cx', x1 - 1) .attr('cy', y) .attr('r', r); lineEnter.append('circle') .attr('class', 'vertex') - .attr('cx', x2) + .attr('cx', x2 + 1) .attr('cy', y) .attr('r', r); From 7c34a85eed02180c9819ea9612587d8f49c4cf8d Mon Sep 17 00:00:00 2001 From: Quincy Morgan Date: Thu, 14 Feb 2019 10:33:26 -0500 Subject: [PATCH 9/9] Fix rtl layout for line preset icons --- css/80_app.css | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/css/80_app.css b/css/80_app.css index 13302f685..839ebe71c 100644 --- a/css/80_app.css +++ b/css/80_app.css @@ -951,9 +951,14 @@ a.hide-toggle { .preset-icon-line { margin: auto; position: absolute; - left: 0; top: 0; } +[dir='ltr'] .preset-icon-line { + left: 0; +} +[dir='rtl'] .preset-icon-line { + right: 0; +} .preset-icon-line path.line { cursor: inherit; } @@ -1073,6 +1078,10 @@ a.hide-toggle { right: auto; } +[dir='rtl'] .preset-list-button-wrap .preset-icon-44 { + right: 8px; +} + [dir='rtl'] .preset-list-button-wrap .preset-icon-28 { right: 16px; }