Skip to contents

Zoom a live GeoLibre map to a layer's extent

Usage

geolibre_zoom_to_layer(proxy, layer_id, request_id = NULL)

Arguments

proxy

A GeoLibre proxy created by geolibre_proxy().

layer_id

The layer's id, as reported by get_layers().

request_id

Optional id echoed back with the reply.

Value

The proxy, invisibly.

Examples

if (interactive() && requireNamespace("shiny", quietly = TRUE)) {
  geolibre_zoom_to_layer(geolibre_proxy("map"), "layer-id")
}