Closed e-clin closed 4 years ago
I tried to replace the leaflet default (OpenStreetMap) tiles in following code example (taken from the "Leaflet for R" site)
leaflet() %>% setView(lng = -71.0589, lat = 42.3601, zoom = 12) %>% addTiles()
with Bing Maps tiles by
leaflet() %>% setView(lng = -71.0589, lat = 42.3601, zoom = 12) %>% addBingTiles(apikey = Sys.getenv("_MY_KEY_"), imagerySet = "CanvasLight")
but the basemap did not render - I only got a grey canvas.
The syntax of addBingTiles() seems to be simple enough, although I couldn't find a worked example online. Did I miss anything?
addBingTiles()
Many thanks!
Oops! Just realised that I copied and pasted the Sys.getenv() from the leaflet.extras manual... -_|||
Sys.getenv()
I tried to replace the leaflet default (OpenStreetMap) tiles in following code example (taken from the "Leaflet for R" site)
leaflet() %>% setView(lng = -71.0589, lat = 42.3601, zoom = 12) %>% addTiles()
with Bing Maps tiles by
leaflet() %>% setView(lng = -71.0589, lat = 42.3601, zoom = 12) %>% addBingTiles(apikey = Sys.getenv("_MY_KEY_"), imagerySet = "CanvasLight")
but the basemap did not render - I only got a grey canvas.
The syntax of
addBingTiles()
seems to be simple enough, although I couldn't find a worked example online. Did I miss anything?Many thanks!