You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: vignettes/ext_mapgl.Rmd
+17-11Lines changed: 17 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -46,7 +46,10 @@ tmap_options(scale = 0.75)
46
46
47
47
There are two modes included in **tmap**: `"plot"` for static mapping and `"view"` for interactive mapping. See [introduction](https://r-tmap.github.io/tmap/articles/basics_modes). The `"view"` mode uses the JavaScript library Leaflet as backend.
48
48
49
-
The extension package [**tmap.mapgl**](https://r-tmap.github.io/tmap.mapgl/) offers two new modes which are also interactive: `"mapbox"` and `"maplibre"` which use the JavaScript libraries Mapbox GL and Maplibre GL respectively. An API key is required to use `"mapbox"` (free for personal use), but `"maplibre"` is (as the name suggests) free for any use.
49
+
The extension package [**tmap.mapgl**](https://r-tmap.github.io/tmap.mapgl/) offers two new modes which are also interactive: `"mapbox"` and `"maplibre"` which use the JavaScript libraries Mapbox GL and Maplibre GL respectively. The latter is a open source fork of the former before it went from open to closed source.
50
+
51
+
An API key is required to use `"mapbox"` (free for personal use, see [instructions](https://r-tmap.github.io/tmap.mapgl/articles/mapbox#getting-and-using-the-api-key)), but `"maplibre"` is (as the name suggests) free for any use.
52
+
50
53
51
54
Note that *tmap.mapgl* is a bridge between the R packages *mapgl* and *tmap*. It makes the functionality of *mapgl* (making the JavaScript libraries available to R) also available via the *tmap* user interface.
52
55
@@ -64,26 +67,27 @@ tmap_mode("plot")
64
67
map
65
68
```
66
69
70
+
## maplibre
71
+
72
+
```{r, fig.height = 5.5}
73
+
library(tmap.mapgl)
74
+
tmap_mode("maplibre")
75
+
map
76
+
```
77
+
78
+
79
+
67
80
## mapbox
68
81
69
82
For `"mapbox"` an API key is required, which is free for personal use. See [instructions](https://r-tmap.github.io/tmap.mapgl/articles/mapbox#getting-and-using-the-api-key).
0 commit comments