Want to display a picture using leaflet package

Hello Users,

I'd like to display a picture (.png) using R with leaflet package. I used the popup argument but the picture does'nt show.

Here's my code :

library(leaflet)
library(magrittr)

leaflet() %>%
  addTiles() %>%
  addCircleMarkers(
    lng         = 15.4521,
    lat         = -4.5637,
    color       = "blue",
    radius      = 10,
    fill        = TRUE,
    popup       = paste("<img src='avatar.png'/>")
  )

There is a good explanation here:

1 Like

This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.