arc_goto() animates the view, unlike set_view() on a proxy, which jumps
to the new position. arc_screenshot() captures the view as a PNG data URL
and sends it back as input$<output_id>$screenshot.
Usage
arc_goto(proxy, center = NULL, zoom = NULL, extent = NULL, duration = NULL)
arc_screenshot(proxy, format = "png")Arguments
- proxy
Defines which
arc_map_proxy()to act on.- center
default
NULL. Defines the target centre asc(lon, lat).- zoom
default
NULL. Defines the target zoom level.- extent
default
NULL. Defines the target extent, overridingcenterandzoom.- duration
default
NULL. Defines the animation length in milliseconds.- format
default
"png". Defines the screenshot format,"png"or"jpg".
Examples
if (interactive()) {
arc_map_proxy("map") |>
arc_goto(center = c(-79, 35.5), zoom = 8)
}