Map

The simplest way to add an interactive map to your application.

Basic Usage

The Map component handles MapLibre GL setup, theming, and provides context for child components.

Controlled Mode

Monitor the map's viewport state in real-time. This is useful when you need to sync the map state with your application or respond to viewport changes. The example below shows live coordinates, zoom, bearing, and pitch as you interact with the map.

Custom Styles

Use the styles prop to provide custom map styles. This example uses free vector tiles from OpenFreeMap, an open-source project, the data comes from OpenStreetMap.