Skip to content

R package for more customisable Font Awesome markers in Leaflet

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md
Notifications You must be signed in to change notification settings

jack-davison/leaf.magic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

9676a2f Β· Oct 27, 2024

History

37 Commits
Jul 18, 2024
Jul 24, 2024
Jul 18, 2024
Jul 24, 2024
Jul 19, 2024
Jul 24, 2024
Jul 18, 2024
Jul 18, 2024
Jul 24, 2024
Jul 18, 2024
Jul 18, 2024
Oct 27, 2024
Jul 19, 2024
Jul 18, 2024
Jul 18, 2024
Jul 23, 2024
Jul 20, 2024
Jul 20, 2024
Jul 23, 2024
Jul 18, 2024

Repository files navigation

{leaf.magic} - Use Modern Icon Libraries in Leaflet Markers leaf.magic website

CRAN status R-CMD-check

The goal of {leaf.magic} is to overcome the somewhat outdated "Font Awesome" implementation in vanilla R {leaflet} by constructing markers on the fly using {fontawesome} or {bsicons} and {magick}. There are three issues {leaf.magic} sets out to overcome:

  • leaflet::awesomeIcons() is limited to Font Awesome 4 πŸ‘Ž

  • leaflet::awesomeIcons() is limited to a handful of discrete colours πŸ‘Ž

  • leaflet::awesomeIcons() is limited to a single marker size πŸ‘Ž

  • Vanilla {leaflet} doesn't provide any additional features to construct legends, icon palettes, or such like πŸ‘Ž

{leaf.magic} attempts to solve all of this:

  • magicIcons() uses up-to-date versions of Font Awesome, Bootstrap, and Ionicons Icons, powered by {fontawesome} and {bsicons} βœ…

  • magicIcons() uses {fontawesome} to grab a marker shape, and can therefore colour and resize it however the user desires βœ…

  • {leaf.magic} exports functions like iconBin() and addIconLegend() to help developers communicate the meanings of icons to users βœ…

{leaf.magic} is thoroughly documented on the package website, which includes a getting started guide.

Installation

You can install the development version of {leaf.magic} like so:

# install.packages("pak")
pak::pak("jack-davison/leaf.magic")

A screenshot of a map produced using the {leaf.magic} R package.

Attributions

{leaf.magic} is licensed under the MIT License, and would not be possible without the following icon libraries:

Code of Conduct

Please note that the leaf.magic project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

About

R package for more customisable Font Awesome markers in Leaflet

Topics

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages