-
Notifications
You must be signed in to change notification settings - Fork 503
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some Font Awesome icons don't show in awesomeMarkers #691
Comments
Ok found a workaround - use the fontawesome package and make the icon text:
|
Works perfectly for me! Gonna update my code using the fontawesome package. Thanks very much! |
Thanks for describing the workaround @gdmcdonald! I was able to implement it too and am using it in the meantime, though it's not entirely ideal. I'll add my description of how I experienced the issue here, in case it helps clarify what is happening. Problem descriptionSteps to reproduce problematic behavior
Then passing this list of icons to the Expected behaviorWhen I first did the above, I expected the Font Awesome's hamburger icon to be shown, like this: For the expected hamburger icon to be correctly shown, the icon's corresponding HTML element Current behaviorThe hamburger icon is broken: Additional contextThis problem is very similar to what is described in this Leaflet.Icon.Glyph issue on the Leaflet github. The proposed solution there is to specify the icon's I used the 'hamburger' as an example above. There are also many other icons which are free to use, but unavailable if using the Thoughts about possible solutionsFrom a user perspective it would make sense to use a It would probably also help if there was some short information, in the function's help documentation or elsewhere, that explains to users that the Font Awesome v5 icons often necessitate overriding the default 'fa' class. Perhaps this is going too far trying to explain how a dependency, rather than the leaflet package itself, works though. Edit: I reread the issue thread about this and I guess a lot of what I wrote above isn't very relevant since the package maintainer is waiting for another package to be updated: " will not be able to update the dependencies without having Leaflet.awesome-markers updating to handle FAv5". But at least it can give some explanation to other users wondering what's going on. |
It's a workaround of the workaround, but I'm running my app in a server and I don't want to install "fa" from github (because then the deployments need devtools and a gazillion other installs), so what I did it's to just take this dataframe with all the information about fa icons and implement it manually, like so:
And it works nicelly. |
I have problems showing some Font Awesome icons in leaflet using the code below. The "bicycle" icon is displayed as expected, but the "walking" icon is not showing, leaving an empty marker.
Is it because of the font-awesome version that comes installed with leaflet?
Is there an error in my code, or it is the font versions as mentioned here?
Originally posted by @e-clin in #554 (comment)
The text was updated successfully, but these errors were encountered: