From d021920a07c92dec858c93d2afa05200cba6e218 Mon Sep 17 00:00:00 2001 From: Mateusz Konieczny Date: Tue, 12 May 2026 12:31:00 +0200 Subject: [PATCH 1/5] Add Pinhead as icon source. fixes #277 --- CHANGELOG.md | 1 + ICONS.md | 1 + MIGRATION_GUIDE.md | 12 +++++++++--- lib/build.js | 3 +++ 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c32db23..11f1837 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ * :warning: Add _integer_ field type ([#217], thanks [@k-yle]) * :warning: Store `terms` and `aliases` as an array in the translation files ([#227], thanks [@k-yle]) * :warning: Support discarding tags, not just keys ([#231], thanks [@k-yle]) +* Pinhead is now available as dependency ([#300], thanks [@matkoniecz]) ###### Non-breaking changes, which affect consumers diff --git a/ICONS.md b/ICONS.md index 5f05ced..e39e069 100644 --- a/ICONS.md +++ b/ICONS.md @@ -14,6 +14,7 @@ Icons from the below listed sources can be used. When specifying an icon, use th | [Font Awesome Solid](https://fontawesome.com/search?o=r&ic=free&s=solid) | `fas-` | Solid style icons from Font Awesome (free tier) | [Preview](https://icones.js.org/collection/fa7-solid) | | [Font Awesome Regular](https://fontawesome.com/search?o=r&ic=free&s=regular) | `far-` | Regular style icons from Font Awesome (free tier) | [Preview](https://icones.js.org/collection/fa7-regular) | | [Font Awesome Brands](https://fontawesome.com/search?o=r&ic=free&ip=brands) | `fab-` | Brand icons from Font Awesome (free tier) | [Preview](https://icones.js.org/collection/fa7-brands) | +| [Pinhead](https://pinhead.ink/) | `pinhead-` | Public domain icons for map pins | [Preview](https://pinhead.ink/) | | [iD Presets](https://github.com/openstreetmap/iD/tree/develop/svg/iD-sprite/presets) | `iD-` | iD's presets-icons | - | | [iD Fields](https://github.com/openstreetmap/iD/tree/develop/svg/iD-sprite/fields) | `iD-` | iD's fields-icons | - | diff --git a/MIGRATION_GUIDE.md b/MIGRATION_GUIDE.md index 441fc30..4a5b72d 100644 --- a/MIGRATION_GUIDE.md +++ b/MIGRATION_GUIDE.md @@ -1,6 +1,6 @@ # v7 Migration Guide -v7 of [id-tagging-schema](https://github.com/openstreetmap/id-tagging-schema) and [schema-builder](https://github.com/ideditor/schema-builder) contains 5 breaking changes, where data consumers will need to take action. +v7 of [id-tagging-schema](https://github.com/openstreetmap/id-tagging-schema) and [schema-builder](https://github.com/ideditor/schema-builder) contains 6 breaking changes, where data consumers will need to take action. This document is a brief migration guide. The full list of changes is in [CHANGELOG.md](./CHANGELOG.md). @@ -117,7 +117,13 @@ Any other values of the `attribution` tag should NOT be discarded. > [!IMPORTANT] > Action Required: If you use this file, ensure that your code handles the new format. -## 6. No more references ([#281](https://github.com/ideditor/schema-builder/pull/281)) +## 6. New icon set ([#300](https://github.com/ideditor/schema-builder/pull/300)) + +`pinhead-` prefixed icon codes are now allowed and point to [https://pinhead.ink/](https://pinhead.ink/) project. Support for one more icon set should be added. + +See also [bundling proposal](https://github.com/openstreetmap/id-tagging-schema/issues/2208) considered to be added in future (feedback welcome). + +## 7. No more references ([#281](https://github.com/ideditor/schema-builder/pull/281)) If you currently parse the fields `stringsCrossReference` or `iconsCrossReference`, or if you handle the reference syntax (such as `"{natural/beach}"`), all this logic can be now be deleted. @@ -129,6 +135,6 @@ It also allows iD-tagging-schema to implement new internal referencing logic (su > [!IMPORTANT] > Action Required: None. Optionally, you could delete this logic from your code. -## 7. Other changes +## 8. Other changes See the [CHANGELOG.md](./CHANGELOG.md) file for the 3 other non-breaking changes to the schema. diff --git a/lib/build.js b/lib/build.js index 36c53ca..b8ab0f6 100644 --- a/lib/build.js +++ b/lib/build.js @@ -638,6 +638,9 @@ function generateTaginfo(presets, fields, deprecated, discarded, tstrings, proje } else if (/^fa[srb]-/.test(preset.icon)) { tag.icon_url = 'https://cdn.jsdelivr.net/gh/openstreetmap/iD@develop/svg/fontawesome/' + preset.icon + '.svg'; + } else if (/^pinhead-/.test(preset.icon)) { + tag.icon_url = 'https://cdn.jsdelivr.net/gh/waysidemapping/pinhead/icons/' + + preset.icon.replace(/^pinhead-/, '') + '.svg'; } else if (/^iD-/.test(preset.icon)) { tag.icon_url = 'https://cdn.jsdelivr.net/gh/openstreetmap/iD@develop/svg/iD-sprite/presets/' + preset.icon.replace(/^iD-/, '') + '.svg'; From 11f49b6a895fc708c004bda9a3a113b42a4e4456 Mon Sep 17 00:00:00 2001 From: Martin Raifer Date: Tue, 12 May 2026 12:40:11 +0200 Subject: [PATCH 2/5] tweak wording --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 11f1837..059c7a0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,7 +20,7 @@ * :warning: Add _integer_ field type ([#217], thanks [@k-yle]) * :warning: Store `terms` and `aliases` as an array in the translation files ([#227], thanks [@k-yle]) * :warning: Support discarding tags, not just keys ([#231], thanks [@k-yle]) -* Pinhead is now available as dependency ([#300], thanks [@matkoniecz]) +* :warning: Pinhead icon set is allowed as an additional source for icons ([#300], thanks [@matkoniecz]) ###### Non-breaking changes, which affect consumers From a508d67b1887073f228ba7981dfd65d6be1e3cec Mon Sep 17 00:00:00 2001 From: Mateusz Konieczny Date: Fri, 15 May 2026 01:13:52 +0200 Subject: [PATCH 3/5] Better Pinhead link --- lib/build.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/build.js b/lib/build.js index b8ab0f6..ac0f95c 100644 --- a/lib/build.js +++ b/lib/build.js @@ -639,7 +639,7 @@ function generateTaginfo(presets, fields, deprecated, discarded, tstrings, proje tag.icon_url = 'https://cdn.jsdelivr.net/gh/openstreetmap/iD@develop/svg/fontawesome/' + preset.icon + '.svg'; } else if (/^pinhead-/.test(preset.icon)) { - tag.icon_url = 'https://cdn.jsdelivr.net/gh/waysidemapping/pinhead/icons/' + + tag.icon_url = 'pinhead.ink/latest/' + preset.icon.replace(/^pinhead-/, '') + '.svg'; } else if (/^iD-/.test(preset.icon)) { tag.icon_url = 'https://cdn.jsdelivr.net/gh/openstreetmap/iD@develop/svg/iD-sprite/presets/' + From 60acdc845b3cf55cf5df2678424f3ce9297ee8ad Mon Sep 17 00:00:00 2001 From: Mateusz Konieczny Date: Fri, 15 May 2026 01:15:06 +0200 Subject: [PATCH 4/5] fix link --- lib/build.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/build.js b/lib/build.js index ac0f95c..8932664 100644 --- a/lib/build.js +++ b/lib/build.js @@ -639,7 +639,7 @@ function generateTaginfo(presets, fields, deprecated, discarded, tstrings, proje tag.icon_url = 'https://cdn.jsdelivr.net/gh/openstreetmap/iD@develop/svg/fontawesome/' + preset.icon + '.svg'; } else if (/^pinhead-/.test(preset.icon)) { - tag.icon_url = 'pinhead.ink/latest/' + + tag.icon_url = 'https://pinhead.ink/latest/' + preset.icon.replace(/^pinhead-/, '') + '.svg'; } else if (/^iD-/.test(preset.icon)) { tag.icon_url = 'https://cdn.jsdelivr.net/gh/openstreetmap/iD@develop/svg/iD-sprite/presets/' + From 4281b482c0ea57e8a34ebe52ebc808ab99ca13f0 Mon Sep 17 00:00:00 2001 From: Mateusz Konieczny Date: Fri, 15 May 2026 01:16:03 +0200 Subject: [PATCH 5/5] specify icon source --- MIGRATION_GUIDE.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MIGRATION_GUIDE.md b/MIGRATION_GUIDE.md index 4a5b72d..af80bdb 100644 --- a/MIGRATION_GUIDE.md +++ b/MIGRATION_GUIDE.md @@ -121,6 +121,8 @@ Any other values of the `attribution` tag should NOT be discarded. `pinhead-` prefixed icon codes are now allowed and point to [https://pinhead.ink/](https://pinhead.ink/) project. Support for one more icon set should be added. +Icons can be obtained from `https://pinhead.ink/latest/{ID}.svg` for `pinhead-{ID}` icon reference. + See also [bundling proposal](https://github.com/openstreetmap/id-tagging-schema/issues/2208) considered to be added in future (feedback welcome). ## 7. No more references ([#281](https://github.com/ideditor/schema-builder/pull/281))