r-spatial / leafem

leaflet extensions for mapview
https://r-spatial.github.io/leafem/
Other
108 stars 30 forks source link

footnotes #66

Closed antoine4ucsd closed 1 year ago

antoine4ucsd commented 1 year ago

hello thank you for this great package is there a way to add footnotes (free text) below the map? I want to put it side by side with a logo (one at the bottom left, the other at the bottom right.) thank you!

tim-salabim commented 1 year ago

I believe you can use leaflet::addAttribution() for that.

antoine4ucsd commented 1 year ago

Great. I will give it a try and let you know if it works Thank you!

a

On May 16, 2023, at 6:49 PM, tim-salabim @.***> wrote:



antoine4ucsd commented 1 year ago

this is working:

        addTiles(attribution = 'Hello')

thank you may I ask one mroe thing: I wanted to add a logo. it works well with :

        leafem::addLogo(img ="mylogo.png",src = "local",position = "bottomright" ,width =800)

but it does not show up in any html or rmarkdown document. is there a way to make it work? with knitr?? all advices are welcome. I only have my logo saved locally...

Best,

tim-salabim commented 1 year ago

Yeah, I've been meaning to address this for a while now... Not sure when I will find the time for it though

antoine4ucsd commented 1 year ago

thank you!

antoine4ucsd commented 1 year ago

hello, I found a workaround for the logo (by using an online version). I am trying to finalize the attrition and I would like to remove the hyperlink to leaflet website but still include some text below the map.

If I do

leaflet::leaflet(mymap,
                           options = leaflet::leafletOptions(attributionControl=F))|>
                       addTiles(attribution = 'Hello world')

it does remove the hyperlink but then my text is not showing up either.

is there a way to (1) only include the text without leaflet prefix? (2) if not , remove the attrition but include a free text below the map?

thank you!