Hello again,
First of all I thank you for your answer which was very useful, nevertheless some problems persist.
It does work from an internet picture link however ...I'm not sure how to resize my image, but I'd like to know how to do it, because it's huge and it's too big to fit in the frame.
Also, could you please give me an example of a web server? I have already tried Dropbox or ImgBB which store pictures and provide me an acess link but unfortunately it doesn't work, the link is probably not included -> An example is provided in the code.
Here is my code:
# [FINAL] Show the map
Map_Herisson<-leaflet() %>%
addProviderTiles("Esri.WorldImagery") %>%
addCircleMarkers(data = Data_Herisson,
lat = ~latitude,
lng = ~longitude,
color = ~pal(Data_Herisson$genus_name),
stroke = FALSE,
popup = paste(paste0("<img src='https://www.r-project.org/logo/Rlogo.png", "' />"),
"<br>","<br>",
"Taxinomie : ", Data_Herisson$complete_name,
"<br>",
"N° échantillonnage : ", Data_Herisson$specimen_code,
"<br>","<br>","<hr>",
"Mode de conservation : ", Data_Herisson$preservation_method,
"<br>",
"Date prélèvement : ", Data_Herisson$date_collected,
"<br>",
"Statut étude phylogénétique : ", Data_Herisson$phylogeny_status),
label = ~as.character(name),
clusterOptions = markerClusterOptions(),
fillOpacity = 0.5)
# Legend
Map_Herisson %>% addLegend(data = Data_Herisson,
position = "topright",
pal = pal,
values = Data_Herisson$genus_name,
title = "Genres de Hedgehogs",
opacity = 1)
# - - - - - - - - -
# [FINAL] Map with picture from a dropbox link
Map_Herisson<-leaflet() %>%
addProviderTiles("Esri.WorldImagery") %>%
addCircleMarkers(data = Data_Herisson,
lat = ~latitude,
lng = ~longitude,
color = ~pal(Data_Herisson$genus_name),
stroke = FALSE,
popup = paste(paste0("<img src='https://www.dropbox.com/s/9njtb9o9lql25o0/atelerix_algirus.jpg?dl=0", "' />"),
"<br>","<br>",
"Taxinomie : ", Data_Herisson$complete_name,
"<br>",
"N° échantillonnage : ", Data_Herisson$specimen_code,
"<br>","<br>","<hr>",
"Mode de conservation : ", Data_Herisson$preservation_method,
"<br>",
"Date prélèvement : ", Data_Herisson$date_collected,
"<br>",
"Statut étude phylogénétique : ", Data_Herisson$phylogeny_status),
label = ~as.character(name),
clusterOptions = markerClusterOptions(),
fillOpacity = 0.5)
# Legend
Map_Herisson %>% addLegend(data = Data_Herisson,
position = "topright",
pal = pal,
values = Data_Herisson$genus_name,
title = "Genres de Hedgehogs",
opacity = 1)
Thanks again for your help