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.
This commit is contained in:
parent
87858b36e4
commit
7bcbb1a8e4
3 changed files with 23 additions and 0 deletions
|
|
@ -190,6 +190,8 @@ BR.LayersConfig = L.Class.extend({
|
|||
markerSign = `<img class="icon-invert" src="dist/images/${icon.substr(5)}-11.svg" />`;
|
||||
} else if (icon && icon.startsWith('temaki-')) {
|
||||
markerSign = `<img class="icon-invert" src="dist/images/${icon.substr(7)}.svg" width="11" />`;
|
||||
} else if (icon && icon.startsWith('fas-')) {
|
||||
markerSign = `<img class="icon-invert" src="dist/images/${icon.substr(4)}.svg" width="11" />`;
|
||||
}
|
||||
|
||||
return Object.assign(
|
||||
|
|
|
|||
16
package.json
16
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"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue