From 7bcbb1a8e4cb7a5ba702b4e4b74335034f2fc39a Mon Sep 17 00:00:00 2001 From: Norbert Renner Date: Wed, 7 Apr 2021 12:51:50 +0200 Subject: [PATCH] Use Font Awesome 5 icons as SVG for POI layers where iD Tagging Schema references "fas-*" icons. For now, only use selected FA 5 SVG files for overpass layers (without loading any FA 5 JS, CSS or font) and stick with FA 4.7 for everything else. --- js/LayersConfig.js | 2 ++ package.json | 16 ++++++++++++++++ yarn.lock | 5 +++++ 3 files changed, 23 insertions(+) diff --git a/js/LayersConfig.js b/js/LayersConfig.js index a2fd125..4a1fba9 100644 --- a/js/LayersConfig.js +++ b/js/LayersConfig.js @@ -190,6 +190,8 @@ BR.LayersConfig = L.Class.extend({ markerSign = ``; } else if (icon && icon.startsWith('temaki-')) { markerSign = ``; + } else if (icon && icon.startsWith('fas-')) { + markerSign = ``; } return Object.assign( diff --git a/package.json b/package.json index 7c9a020..e387f71 100644 --- a/package.json +++ b/package.json @@ -36,6 +36,7 @@ ], "dependencies": { "@bagage/leaflet.restoreview": "1.0.1", + "@fortawesome/fontawesome-free": "^5.15.3", "@ideditor/temaki": "^5.0.0", "@mapbox/maki": "^6.2.0", "@mapbox/polyline": "^0.2.0", @@ -339,6 +340,21 @@ "icons/spotting_scope.svg", "icons/cabin.svg" ] + }, + "@fortawesome/fontawesome-free": { + "main": [ + "svgs/solid/shopping-basket.svg", + "svgs/solid/ice-cream.svg", + "svgs/solid/carrot.svg", + "svgs/solid/cheese.svg", + "svgs/solid/concierge-bell.svg", + "svgs/solid/motorcycle.svg", + "svgs/solid/charging-station.svg", + "svgs/solid/box.svg", + "svgs/solid/taxi.svg", + "svgs/solid/phone-alt.svg", + "svgs/solid/beer.svg" + ] } } } diff --git a/yarn.lock b/yarn.lock index dc91738..4fc2a02 100644 --- a/yarn.lock +++ b/yarn.lock @@ -865,6 +865,11 @@ minimatch "^3.0.4" strip-json-comments "^3.1.1" +"@fortawesome/fontawesome-free@^5.15.3": + version "5.15.3" + resolved "https://registry.yarnpkg.com/@fortawesome/fontawesome-free/-/fontawesome-free-5.15.3.tgz#c36ffa64a2a239bf948541a97b6ae8d729e09a9a" + integrity sha512-rFnSUN/QOtnOAgqFRooTA3H57JLDm0QEG/jPdk+tLQNL/eWd+Aok8g3qCI+Q1xuDPWpGW/i9JySpJVsq8Q0s9w== + "@gulp-sourcemaps/identity-map@^2.0.1": version "2.0.1" resolved "https://registry.yarnpkg.com/@gulp-sourcemaps/identity-map/-/identity-map-2.0.1.tgz#a6e8b1abec8f790ec6be2b8c500e6e68037c0019"