CLI

Install mapcn with a single command and choose your provider when you need it.

mapcn-rn is a thin wrapper around the React Native Reusables CLI. It asks for your map provider, resolves the correct registry URL, and installs the component into components/ui/map.tsx.

Interactive install

Run the CLI with no flags if you want to choose the provider interactively.

npx mapcn-rn add

Pick a provider up front

If you already know which provider you want, pass it directly and skip the prompt.

CARTO

npx mapcn-rn add --provider=carto

MapTiler

npx mapcn-rn add --provider=maptiler

Mapbox

npx mapcn-rn add --provider=mapbox

Provider notes

  • carto uses the default MapLibre-based component with CARTO basemaps.
  • maptiler keeps the MapLibre setup and switches the basemap provider.
  • mapbox switches the native implementation to @rnmapbox/maps.
Native setup still matters after install. For permissions and Expo configuration, see the installation guide. For provider-specific keys and commercial guidance, see commercial use.