Map

An interactive map component with markers, pan/zoom functionality, and tooltip support powered by Leaflet and OpenStreetMap. Perfect for location-based visualizations and geographic data displays.

Examples

This interactive demo runs inside the showcase's app-level TamboProvider, which sets a per-user context key (persisted in localStorage).

Seattle Coffee Map

Tambo Conversations

Loading threads...

Installation

$
npx tambo add map

Component API

Map

PropTypeDefaultDescription
center{ lat: number; lng: number }-Map center coordinates
zoomnumber10Initial zoom level (1-20)
markersMapMarker[][]Array of marker configurations
heatDataHeatData[]-Optional array of heatmap data points (lat, lng, intensity)
zoomControlbooleantrueWhether to show zoom controls
size"sm" | "md" | "lg" | "full""md"Height of the map container
tileTheme"default" | "dark" | "light" | "satellite""default"Map tile layer theme
rounded"none" | "sm" | "md" | "full""md"Border radius of the map container
classNamestring-Additional CSS classes for customization

MapMarker

PropTypeDefaultDescription
latnumber-Latitude coordinate (-90 to 90)
lngnumber-Longitude coordinate (-180 to 180)
labelstring-Marker label displayed in tooltip
idstring-Optional unique identifier for the marker