I'm trying to emulate the first example on https://rstudio.github.io/leaflet/popups.html but with a vector of html tags rather than one.
Example on https://rstudio.github.io/leaflet/popups.html:
content
[1] "<b><a href='http://www.samurainoodle.com'>Samurai Noodle</a></b><br/>606 5th Ave. S<br/>Seattle, WA 98138" Mine:
bird$html[1]
[1] "<a href=‘https://www.allaboutbirds.org/guide/Gadwall/id’>more info</a>" However, when I pass the code to leaflet popup, the more info hyperlink displays and links to a not found page rather than the url. Do i have to add any special characters to the HTML tag (e.g. slashes or quotations)? Any thoughts?
leaflet () %>% addTiles(urlTemplate = base_map, attribution = mb_attribution)%>% addMarkers(bird$lon, bird$lat, popup=paste(sep="","<b>", bird$Common.Name,"</b>", "<br/>","<font size=2 color=#045FB4>","Scientific Name: ","</font>" ,bird$Scientific.Name, "<br/>","<font size=2 color=#045FB4>","Number Observed: ","</font>", bird$Count, "<br/>","<font size=2 color=#045FB4>","Location: ","</font>", bird$Location, "<br/>","<font size=2 color=#045FB4>","Region: ","</font>", bird$Area, "<br/>","<font size=2 color=#045FB4>", "Date: ", "</font>", bird$Date, "<br/>", bird$html), clusterOptions = markerClusterOptions()) %>% addPopups(bird$lon, bird$lat, bird$html, options = popupOptions(closeButton = FALSE) )