Saving a map of R-sheets as html: tiles are not included

I am trying to save the map booklet map R using saveWidget () or rmd file output in html - as described here: Saving output sheets as html

When creating an html markdown file, the map will display well in the rstudio internal viewer, however, if I open the generated html file or html file created by saveWidget () in the browser, only circles are displayed, not tiles.

Minimal example:

```{r}
library(leaflet)
library(htmlwidgets)

m <- leaflet(data.frame(lat = 55.71654, lng = 12.47484))
m <-  addCircles(m, popup = "testpopup")
m <-  addTiles(m)
m
saveWidget(m, file="testmap.html")
```
+4
source share
2 answers

% > % addProviderTiles ( $OpenStreetMap), . ()

+5

, . ggmap , PNG .

0

Source: https://habr.com/ru/post/1676363/


All Articles