Learn R Programming

mapgl (version 0.2.1)

set_projection: Set Projection for a Mapbox/Maplibre Map

Description

This function sets the projection dynamically after map initialization.

Usage

set_projection(map, projection)

Value

The modified map object

Arguments

map

A map object created by mapboxgl() or maplibre() functions, or their respective proxy objects

projection

A string representing the projection name (e.g., "mercator", "globe", "albers", "equalEarth", etc.)