mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-15 21:48:20 +02:00
Fetch id-tagging-schema icons from the bleeding edge as well as the release versions when building data
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="shoe-prints" class="svg-inline--fa fa-shoe-prints fa-w-20" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><path fill="currentColor" d="M192 160h32V32h-32c-35.35 0-64 28.65-64 64s28.65 64 64 64zM0 416c0 35.35 28.65 64 64 64h32V352H64c-35.35 0-64 28.65-64 64zm337.46-128c-34.91 0-76.16 13.12-104.73 32-24.79 16.38-44.52 32-104.73 32v128l57.53 15.97c26.21 7.28 53.01 13.12 80.31 15.05 32.69 2.31 65.6.67 97.58-6.2C472.9 481.3 512 429.22 512 384c0-64-84.18-96-174.54-96zM491.42 7.19C459.44.32 426.53-1.33 393.84.99c-27.3 1.93-54.1 7.77-80.31 15.04L256 32v128c60.2 0 79.94 15.62 104.73 32 28.57 18.88 69.82 32 104.73 32C555.82 224 640 192 640 128c0-45.22-39.1-97.3-148.58-120.81z"></path></svg>
|
||||
|
After Width: | Height: | Size: 781 B |
Reference in New Issue
Block a user