Ben Gillespie
Ben Gillespie

Reputation: 41

Add text to leaflet map in rCharts

I'm using rCharts to create a leaflet map in RStudio.

Does anyone know whether it's possible to add text to the resultant map at a specific point (e.g.)

I can't see this as a specific feature noted on the rCharts leaflet github page: https://github.com/ramnathv/rCharts/blob/master/R/Leaflet.R

Upvotes: 3

Views: 896

Answers (1)

Paul Govan
Paul Govan

Reputation: 703

I might suggest the leaflet package, as it is more actively maintained:

library(leaflet)

content <- paste(sep = "<br/>",
  "I am some text"
)

leaflet() %>% addTiles() %>%
  addPopups(-122.327298, 47.597131, content,
    options = popupOptions(closeButton = FALSE)
  )

enter image description here

Upvotes: 2

Related Questions