set_view function

Set the map center and zoom level

Set the map center and zoom level

set_view(map, center, zoom)

Arguments

  • map: A map object created by the mapboxgl or maplibre function or a proxy object.
  • center: A numeric vector of length 2 specifying the center of the map (longitude, latitude).
  • zoom: The zoom level.

Returns

The updated map object.

  • Maintainer: Kyle Walker
  • License: MIT + file LICENSE
  • Last published: 2025-03-18