add_tiles {rbokeh} | R Documentation

## Add map tiles to a Bokeh figure.

### Description

Add map tiles to a Bokeh figure.

### Usage

    add_tiles(fig, tile_spec, hi_res = TRUE, y_origin_offset = NULL,
      x_origin_offset = NULL, min_zoom = NULL, max_zoom = NULL,
      extra_url_vars = NULL, initial_resolution = NULL, tile_size = NULL,
      alpha = NULL, render_parents = NULL, visible = NULL, level = NULL)

### Arguments

`fig` | figure to modify
`tile_spec` | A character string indicating to use one of the pre-defined tile specifications (see details) or a custom tile specification from calling `tile_spec`.
`hi_res` | When using a pre-defined tile specification, should a high-resolution (if available) version of the tiles be served? Boolean.
`y_origin_offset` | A y-offset in plot coordinates
`x_origin_offset` | An x-offset in plot coordinates
`min_zoom` | A minimum zoom level for the tile layer. This is the most zoomed-out level.
`max_zoom` | A maximum zoom level for the tile layer. This is the most zoomed-in level.
`extra_url_vars` | A dictionary that maps url variable template keys to values. These variables are useful for parts of tile urls which do not change from tile to tile (e.g. server host name, or layer name).
`initial_resolution` | Resolution (plot_units / pixels) of minimum zoom level of tileset projection. NULL to auto-compute.
`tile_size` | Tile size in pixels (e.g. 256)
`alpha` | Tile opacity 0.0 - 1.0.
`render_parents` | Flag enable/disable drawing of parent tiles while waiting for new tiles to arrive. Default value is TRUE.
`visible` | Is the renderer visible?
`level` | Specifies the level in which to paint this renderer. One of 'image', 'underlay', 'glyph', 'annotation', 'overlay'.

### Details

Here is a list of pre-defined tile specifications from different sources:

Stamen (http://maps.stamen.com/)

- toner —http://maps.stamen.com/toner/#12/37.7706/-122.3782

- toner-hybrid —http://maps.stamen.com/toner-hybrid/#12/37.7706/-122.3782

- toner-labels —http://maps.stamen.com/toner-labels/#12/37.7706/-122.3782

- toner-lines —http://maps.stamen.com/toner-lines/#12/37.7706/-122.3782

- toner-background —http://maps.stamen.com/toner-background/#12/37.7706/-122.3782

- toner-lite —http://maps.stamen.com/toner-lite/#12/37.7706/-122.3782

- terrain —http://maps.stamen.com/terrain/#12/37.7706/-122.3782

- terrain-labels —http://maps.stamen.com/terrain-labels/#12/37.7706/-122.3782

- terrain-lines —http://maps.stamen.com/terrain-lines/#12/37.7706/-122.3782

- terrain-background —http://maps.stamen.com/terrain-background/#12/37.7706/-122.3782

Carto (https://carto.com/location-data-services/basemaps/)

- carto_light_all

- carto_dark_all

- carto_light_nolabels

- carto_light_only_labels

- carto_dark_nolabels

- carto_dark_only_labels

Wikipedia

- wikepedia

### Examples

    figure(width = 800) %>%
      add_tiles("stamen_toner")

    figure(width = 800) %>%
      add_tiles("carto_light_all")

    figure(width = 800) %>%
      add_tiles("wikipedia")

[Package rbokeh version 0.6.3 Index]