serve_mvt | R Documentation |
Starts a web server in a background R session serving vector tiles from a supplied .mbtiles file.
serve_mvt(tiles_path, port = NULL, .serve_mode = "in-memory")
tiles_path |
The path to an .mbtiles file. |
port |
The port to for the server to serve mbtiles on. Default is a random available port. |
.serve_mode |
The way in which the server handles the vector tiles database. "in-memory" is the default and it will read the entire tile database into R as a tibble. "disk" will read tiles from the .mbtiles file as an SQLite database from disk. The default is more performant. Use "disk" only if you have a large vector tileset that would consume too much memory to hold in RAM at once. |
start_mvt_server for more control of server behaviour.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.