set_projection function

Set Projection for a Mapbox/Maplibre Map

Set Projection for a Mapbox/Maplibre Map

This function sets the projection dynamically after map initialization.

set_projection(map, projection)

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.)

Returns

The modified map object

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