diff --git a/scripts/build_data.js b/scripts/build_data.js index 5dea115f7..adc801d32 100644 --- a/scripts/build_data.js +++ b/scripts/build_data.js @@ -88,18 +88,20 @@ function buildData() { minifyJSON('data/shortcuts.json', 'dist/data/shortcuts.min.json'), minifyJSON('data/territory_languages.json', 'dist/data/territory_languages.min.json'), Promise.all([ + // Fetch the icons that are needed by the expected tagging schema version fetch('https://cdn.jsdelivr.net/npm/@openstreetmap/id-tagging-schema@2/dist/presets.min.json'), fetch('https://cdn.jsdelivr.net/npm/@openstreetmap/id-tagging-schema@2/dist/preset_categories.min.json'), - fetch('https://cdn.jsdelivr.net/npm/@openstreetmap/id-tagging-schema@2/dist/fields.min.json') + fetch('https://cdn.jsdelivr.net/npm/@openstreetmap/id-tagging-schema@2/dist/fields.min.json'), + // WARNING: we fetch the bleeding edge data too to make sure we're always hosting the + // latest icons, but note that the format could break at any time + fetch('https://raw.githubusercontent.com/openstreetmap/id-tagging-schema/main/dist/presets.min.json'), + fetch('https://raw.githubusercontent.com/openstreetmap/id-tagging-schema/main/dist/preset_categories.min.json'), + fetch('https://raw.githubusercontent.com/openstreetmap/id-tagging-schema/main/dist/fields.min.json') ]) .then(responses => Promise.all(responses.map(response => response.json()))) .then((results) => { - const presets = results[0]; - const categories = results[1]; - const fields = results[2]; - - // add icons for presets - [categories, fields, presets].forEach(function(data) { + // compile the icons used by all the presets + results.forEach(function(data) { for (var key in data) { var datum = data[key]; // fontawesome icon diff --git a/svg/fontawesome/fas-shoe-prints.svg b/svg/fontawesome/fas-shoe-prints.svg new file mode 100644 index 000000000..0735f216f --- /dev/null +++ b/svg/fontawesome/fas-shoe-prints.svg @@ -0,0 +1 @@ + \ No newline at end of file