Learn R Programming

toro

Create interactive maps that can keep up with complex visualisations and large datasets, with this useful interface to the MapLibre GL JS library. Users can create maps directly in the console, or as an HTML widget within 'Shiny' web applications, and render spatial data quickly with many customisable options (clusters, custom icons, map layers, and backgrounds). The goal of the package is to make it easier to interpret and explore large spatial datasets within the context of a 'Shiny' dashboard, without having long loading times waiting for a map to update with new data.

Installation

Install from CRAN:

install.packages("toro")

Or, install the development version from GitHub:

# install.packages("remotes")
remotes::install_github("Epi-interactive-Ltd/toro")

Documentation

You can find extensive documentation, guides, and examples at: https://epi-interactive-ltd.github.io/toro/.

Example

The most basic use case is as follows:

library(toro)
map()

More specific in-depth examples can be found here.

Contributing

If you would like to contribute to toro see: Contributing to toro.

Licensing

This package is licensed under AGPL-3.

Copy Link

Version

Install

install.packages('toro')

Version

0.1.0

License

AGPL (>= 3)

Issues

Pull Requests

Stars

Forks

Maintainer

Poppy Pakinui

Last Published

May 7th, 2026

Functions in toro (0.1.0)

add_draw_control

Add a draw control to the map
add_route

Add a route to a toro map which can be animated
add_source

Add a source to the map
add_control_panel

Add a control panel to the map
add_speed_control

Add a speed control to the map or control panel
add_symbol_layer

Add a symbol layer to a map or map proxy
add_control_to_panel

Add a control to an existing control panel
add_cluster_toggle

Add a cluster toggle control to the map or control panel
add_control_group

Add a control group to a control panel
add_text_layer

Add a text layer to a map or map proxy
add_line_layer

Add a line layer to a map or map proxy
add_layer_selector_control

Add a layer selector control to the map or control panel
add_layer

Add a layer to a map or map proxy
add_lat_lng_grid

Add a grid of latitude and longitude lines to the map
add_zoom_control

Add a zoom control to the map
add_tiles_from_wms

Add an Image Server source to a toro map
get_drawn_shape

Get the drawn shape from the map widget
add_tile_selector_control

Add a tile selector control to the map or control panel
get_layer_filter

Get a filter for a layer
delete_drawn_shape

Delete a drawn shape from the map
mapOutput

Create a MapLibre GL output for use in Shiny
add_timeline_control

Add a timeline control to the map or control panel
add_fill_layer

Add a fill layer to a map or map proxy
add_visibility_toggle

Add a visibility toggle control to the map or control panel
add_image

Add an image source to the map
get_tile_options

Get available tile layer options
add_tiles_from_map_server

Add an Image Server source to a toro map
chrome_error_message

Provide helpful error message for missing Chrome
get_clicked_feature

Get the sf data frame of a clicked feature from the map widget
hide_layer

Hide a layer from the map
get_layout_options

Get layout options for a specific layer type
set_tile_layer

Set the tile layer for the map
set_source_data

Set data for a source on the map
remove_control

Remove a control from the map
pause_route

Pause a route animation on a toro map
get_paint_options

Get paint options for a specific layer type
mapProxy

Create a proxy object for updating the map
remove_control_from_panel

Remove a control from a control panel
remove_draw_control

Remove the draw control from the map
remove_custom_control

Remove a custom control from the map
toggle_lat_lng_grid

Show/hide the latitude and longitude grid on the map
get_column

Get a column from a dataset to use as a paint or layout option in a map layer
get_column_boolean

Get the value for a paint or layout option in a map layer based on a column boolean value
remove_cluster_toggle

Remove a cluster toggle control from the map
play_route

Play a route animation on a toro map
remove_speed_control

Remove the speed control from the map
image_to_data_uri

Helper function to convert local image to data URI
is_local_file

Helper function to detect if URL is a local file path
remove_control_group

Remove a control group from a control panel
remove_tile_selector_control

Remove the tile selector control from the map
set_layout_property

Set a layout property for a layer on the map
map

Create a MapLibre map widget
export_map_image

Export map as an image (non-Shiny context)
set_paint_property

Set a paint property for a layer on the map
show_layer

Show a previously hidden layer on the map
remove_zoom_control

Remove the zoom control from the map
get_column_steps

Get the properties for a column in a map layer based on step breaks
check_chrome_available

Check if Chrome/Chromium is available for webshot operations
get_column_group

Get the values for a paint or layout option in a map layer based on a column value
remove_layer_selector_control

Remove the layer selector control from the map
toggle_control

Toggle the visibility of a control on the map
toggle_clustering

Toggle clustering for a layer on the map
save_map_html

Save map as standalone HTML file
remove_route

Remove an animation route from a toro map
remove_timeline_control

Remove the timeline control from the map
remove_visibility_toggle

Remove a visibility toggle control from the map
renderMap

Render a MapLibre GL map in Shiny
set_zoom

Set the map zoom level
remove_cursor_coords_control

Remove the cursor coordinates control from the map
set_bounds

Set the map bounds
add_custom_control

Add a custom HTML control to the map
add_feature_server_source

Add a FeatureService source to the map
add_cursor_coords_control

Add a cursor coordinates control to the map
add_animation_controls

Add animation controls to a toro map
add_circle_layer

Add a circle layer to a map or map proxy