Skip to content

Commit

Permalink
Add custom icons for crossing presets from temaki 5.7
Browse files Browse the repository at this point in the history
(re: #1259)
  • Loading branch information
bhousel committed Dec 28, 2023
1 parent 2126d7e commit 9cbf3ea
Show file tree
Hide file tree
Showing 4 changed files with 102 additions and 21 deletions.
110 changes: 95 additions & 15 deletions data/preset_overrides.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"natural/tree/broadleaved/evergreen": null,

"natural/tree2": {
"name": "Tree, unspecified type",
"name": "Tree (Unspecified Type)",
"icon": "temaki-tree_broadleaved",
"geometry": ["point", "vertex"],
"fields": [
Expand Down Expand Up @@ -253,44 +253,60 @@

"highway/footway/crossing2/dashes": {
"name": "Marked Crossing (Dashes)",
"icon": "temaki-pedestrian",
"icon": "temaki-crossing_markings-dashes",
"geometry": ["line"],
"tags": { "highway": "footway", "footway": "crossing", "crossing:markings": "dashes" },
"addTags": { "highway": "footway", "footway": "crossing", "crossing": "*", "crossing:markings": "dashes" },
"$note": "Match modern `crossing:markings=dashes`"
},
"highway/footway/crossing2/dots": {
"name": "Marked Crossing (Dots)",
"icon": "temaki-pedestrian",
"icon": "temaki-crossing_markings-dots",
"geometry": ["line"],
"tags": { "highway": "footway", "footway": "crossing", "crossing:markings": "dots" },
"addTags": { "highway": "footway", "footway": "crossing", "crossing": "*", "crossing:markings": "dots" },
"$note": "Match modern `crossing:markings=dots`"
},
"highway/footway/crossing2/ladder": {
"name": "Marked Crossing (Ladder)",
"icon": "temaki-pedestrian",
"icon": "temaki-crossing_markings-ladder",
"geometry": ["line"],
"tags": { "highway": "footway", "footway": "crossing", "crossing:markings": "ladder" },
"addTags": { "highway": "footway", "footway": "crossing", "crossing": "*", "crossing:markings": "ladder" },
"$note": "Match modern `crossing:markings=ladder`"
},
"highway/footway/crossing2/ladder:paired": {
"name": "Marked Crossing (Paired Ladder)",
"icon": "temaki-crossing_markings-ladder_paired",
"geometry": ["line"],
"tags": { "highway": "footway", "footway": "crossing", "crossing:markings": "ladder:paired" },
"addTags": { "highway": "footway", "footway": "crossing", "crossing": "*", "crossing:markings": "ladder:paired" },
"$note": "Match modern `crossing:markings=ladder:paired`"
},
"highway/footway/crossing2/ladder:skewed": {
"name": "Marked Crossing (Skewed Ladder)",
"icon": "temaki-pedestrian",
"icon": "temaki-crossing_markings-ladder_skewed",
"geometry": ["line"],
"tags": { "highway": "footway", "footway": "crossing", "crossing:markings": "ladder:skewed" },
"addTags": { "highway": "footway", "footway": "crossing", "crossing": "*", "crossing:markings": "ladder:skewed" },
"$note": "Match modern `crossing:markings=ladder:skewed`"
},
"highway/footway/crossing2/lines": {
"name": "Marked Crossing (Lines)",
"icon": "temaki-pedestrian",
"icon": "temaki-crossing_markings-lines",
"geometry": ["line"],
"tags": { "highway": "footway", "footway": "crossing", "crossing:markings": "lines" },
"addTags": { "highway": "footway", "footway": "crossing", "crossing": "*", "crossing:markings": "lines" },
"$note": "Match modern `crossing:markings=lines`"
},
"highway/footway/crossing2/lines:paired": {
"name": "Marked Crossing (Paired Lines)",
"icon": "temaki-crossing_markings-lines_paired",
"geometry": ["line"],
"tags": { "highway": "footway", "footway": "crossing", "crossing:markings": "lines:paired" },
"addTags": { "highway": "footway", "footway": "crossing", "crossing": "*", "crossing:markings": "lines:paired" },
"$note": "Match modern `crossing:markings=lines:paired`"
},
"highway/footway/crossing2/other": {
"name": "Marked Crossing (Other)",
"icon": "temaki-pedestrian",
Expand All @@ -301,7 +317,7 @@
},
"highway/footway/crossing2/surface": {
"name": "Marked Crossing (Surface Treatment)",
"icon": "temaki-pedestrian",
"icon": "temaki-crossing_markings-surface",
"geometry": ["line"],
"tags": { "highway": "footway", "footway": "crossing", "crossing:markings": "surface" },
"addTags": { "highway": "footway", "footway": "crossing", "crossing": "*", "crossing:markings": "surface" },
Expand All @@ -317,12 +333,36 @@
},
"highway/footway/crossing2/zebra": {
"name": "Marked Crossing (Zebra)",
"icon": "temaki-pedestrian",
"icon": "temaki-crossing_markings-zebra",
"geometry": ["line"],
"tags": { "highway": "footway", "footway": "crossing", "crossing:markings": "zebra" },
"addTags": { "highway": "footway", "footway": "crossing", "crossing": "*", "crossing:markings": "zebra" },
"$note": "Match modern `crossing:markings=zebra`"
},
"highway/footway/crossing2/zebra:bicolour": {
"name": "Marked Crossing (Bicolor Zebra)",
"icon": "temaki-crossing_markings-zebra_bicolour",
"geometry": ["line"],
"tags": { "highway": "footway", "footway": "crossing", "crossing:markings": "zebra:bicolour" },
"addTags": { "highway": "footway", "footway": "crossing", "crossing": "*", "crossing:markings": "zebra:bicolour" },
"$note": "Match modern `crossing:markings=zebra:bicolour`"
},
"highway/footway/crossing2/zebra:double": {
"name": "Marked Crossing (Double Zebra)",
"icon": "temaki-crossing_markings-zebra_double",
"geometry": ["line"],
"tags": { "highway": "footway", "footway": "crossing", "crossing:markings": "zebra:double" },
"addTags": { "highway": "footway", "footway": "crossing", "crossing": "*", "crossing:markings": "zebra:double" },
"$note": "Match modern `crossing:markings=zebra:double`"
},
"highway/footway/crossing2/zebra:paired": {
"name": "Marked Crossing (Paired Zebra)",
"icon": "temaki-crossing_markings-zebra_paired",
"geometry": ["line"],
"tags": { "highway": "footway", "footway": "crossing", "crossing:markings": "zebra:paired" },
"addTags": { "highway": "footway", "footway": "crossing", "crossing": "*", "crossing:markings": "zebra:paired" },
"$note": "Match modern `crossing:markings=zebra:paired`"
},
"highway/footway/crossing2/signals": {
"name": "Signalized Crossing",
"icon": "temaki-pedestrian",
Expand Down Expand Up @@ -416,44 +456,60 @@

"highway/crossing2/dashes": {
"name": "Marked Crossing (Dashes)",
"icon": "temaki-pedestrian",
"icon": "temaki-crossing_markings-dashes",
"geometry": ["vertex"],
"tags": { "highway": "crossing", "crossing:markings": "dashes" },
"addTags": { "highway": "crossing", "crossing": "*", "crossing:markings": "dashes" },
"$note": "Match modern `crossing:markings=dashes`"
},
"highway/crossing2/dots": {
"name": "Marked Crossing (Dots)",
"icon": "temaki-pedestrian",
"icon": "temaki-crossing_markings-dots",
"geometry": ["vertex"],
"tags": { "highway": "crossing", "crossing:markings": "dots" },
"addTags": { "highway": "crossing", "crossing": "*", "crossing:markings": "dots" },
"$note": "Match modern `crossing:markings=dots`"
},
"highway/crossing2/ladder": {
"name": "Marked Crossing (Ladder)",
"icon": "temaki-pedestrian",
"icon": "temaki-crossing_markings-ladder",
"geometry": ["vertex"],
"tags": { "highway": "crossing", "crossing:markings": "ladder" },
"addTags": { "highway": "crossing", "crossing": "*", "crossing:markings": "ladder" },
"$note": "Match modern `crossing:markings=ladder`"
},
"highway/crossing2/ladder:paired": {
"name": "Marked Crossing (Paired Ladder)",
"icon": "temaki-crossing_markings-ladder_paired",
"geometry": ["vertex"],
"tags": { "highway": "crossing", "crossing:markings": "ladder:paired" },
"addTags": { "highway": "crossing", "crossing": "*", "crossing:markings": "ladder:paired" },
"$note": "Match modern `crossing:markings=ladder:paired`"
},
"highway/crossing2/ladder:skewed": {
"name": "Marked Crossing (Skewed Ladder)",
"icon": "temaki-pedestrian",
"icon": "temaki-crossing_markings-ladder_skewed",
"geometry": ["vertex"],
"tags": { "highway": "crossing", "crossing:markings": "ladder:skewed" },
"addTags": { "highway": "crossing", "crossing": "*", "crossing:markings": "ladder:skewed" },
"$note": "Match modern `crossing:markings=ladder:skewed`"
},
"highway/crossing2/lines": {
"name": "Marked Crossing (Lines)",
"icon": "temaki-pedestrian",
"icon": "temaki-crossing_markings-lines",
"geometry": ["vertex"],
"tags": { "highway": "crossing", "crossing:markings": "lines" },
"addTags": { "highway": "crossing", "crossing": "*", "crossing:markings": "lines" },
"$note": "Match modern `crossing:markings=lines`"
},
"highway/crossing2/lines:paired": {
"name": "Marked Crossing (Paired Lines)",
"icon": "temaki-crossing_markings-lines_paired",
"geometry": ["vertex"],
"tags": { "highway": "crossing", "crossing:markings": "lines:paired" },
"addTags": { "highway": "crossing", "crossing": "*", "crossing:markings": "lines:paired" },
"$note": "Match modern `crossing:markings=lines:paired`"
},
"highway/crossing2/other": {
"name": "Marked Crossing (Other)",
"icon": "temaki-pedestrian",
Expand All @@ -464,7 +520,7 @@
},
"highway/crossing2/surface": {
"name": "Marked Crossing (Surface Treatment)",
"icon": "temaki-pedestrian",
"icon": "temaki-crossing_markings-surface",
"geometry": ["vertex"],
"tags": { "highway": "crossing", "crossing:markings": "surface" },
"addTags": { "highway": "crossing", "crossing": "marked", "crossing:markings": "surface" },
Expand All @@ -480,12 +536,36 @@
},
"highway/crossing2/zebra": {
"name": "Marked Crossing (Zebra)",
"icon": "temaki-pedestrian",
"icon": "temaki-crossing_markings-zebra",
"geometry": ["vertex"],
"tags": { "highway": "crossing", "crossing:markings": "zebra" },
"addTags": { "highway": "crossing", "crossing": "*", "crossing:markings": "zebra" },
"$note": "Match modern `crossing:markings=zebra`"
},
"highway/crossing2/zebra:bicolour": {
"name": "Marked Crossing (Bicolor Zebra)",
"icon": "temaki-crossing_markings-zebra_bicolour",
"geometry": ["vertex"],
"tags": { "highway": "crossing", "crossing:markings": "zebra:bicolour" },
"addTags": { "highway": "crossing", "crossing": "*", "crossing:markings": "zebra:bicolour" },
"$note": "Match modern `crossing:markings=zebra:bicolour`"
},
"highway/crossing2/zebra:double": {
"name": "Marked Crossing (Double Zebra)",
"icon": "temaki-crossing_markings-zebra_double",
"geometry": ["vertex"],
"tags": { "highway": "crossing", "crossing:markings": "zebra:double" },
"addTags": { "highway": "crossing", "crossing": "*", "crossing:markings": "zebra:double" },
"$note": "Match modern `crossing:markings=zebra:double`"
},
"highway/crossing2/zebra:paired": {
"name": "Marked Crossing (Paired Zebra)",
"icon": "temaki-crossing_markings-zebra_paired",
"geometry": ["vertex"],
"tags": { "highway": "crossing", "crossing:markings": "zebra:paired" },
"addTags": { "highway": "crossing", "crossing": "*", "crossing:markings": "zebra:paired" },
"$note": "Match modern `crossing:markings=zebra:paired`"
},
"highway/crossing2/signals": {
"name": "Signalized Crossing",
"icon": "temaki-pedestrian",
Expand Down
4 changes: 2 additions & 2 deletions modules/core/PresetSystem.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,8 @@ if (p.icon) p.icon = p.icon.replace(/^iD-/, 'rapid-');
// A few overrides to use better icons than the ones provided by the id-tagging-schema project
if (presetID === 'address') p.icon = 'maki-circle-stroked';
if (presetID === 'highway/turning_loop') p.icon = 'maki-circle';
if (/^highway\/crossing/.test(presetID)) p.icon = 'temaki-pedestrian';
if (/^highway\/footway\/crossing/.test(presetID)) p.icon = 'temaki-pedestrian';
//if (/^highway\/crossing/.test(presetID)) p.icon = 'temaki-pedestrian';
//if (/^highway\/footway\/crossing/.test(presetID)) p.icon = 'temaki-pedestrian';
if (p.icon === 'roentgen-needleleaved_tree') p.icon = 'temaki-tree_needleleaved';
if (p.icon === 'roentgen-tree') p.icon = 'temaki-tree_broadleaved';

Expand Down
7 changes: 4 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
"@pixi/jsdoc-template": "^2.6.0",
"@playwright/test": "^1.40.1",
"@rapideditor/mapillary_sprite_source": "^1.8.0",
"@rapideditor/temaki": "~5.6.0",
"@rapideditor/temaki": "~5.7.0",
"autoprefixer": "^10.4.16",
"benchmark": "^2.1.4",
"btoa": "^1.2.1",
Expand Down

0 comments on commit 9cbf3ea

Please sign in to comment.