Interactive map controls for zoom, compass, geolocation, and fullscreen actions.
"use client"; import { Map, MapControls } from "@/components/ui/mapcn-map-controls"; const settings = { center: [2.3522, 48.8566], zoom: 10, }; export default function MapControlsDemo(props: Partial<typeof settings>) { const s = { ...settings, ...props }; return ( <div className="h-screen w-screen flex items-center justify-center overflow-hidden bg-background p-8"> <div className="h-[420px] w-full max-w-4xl overflow-hidden rounded-lg border bg-background shadow-sm"> <Map center={s.center} zoom={s.zoom}> <MapControls position="top-right" showZoom showCompass showLocate showFullscreen /> </Map> </div> </div> ); } export { MapControlsDemo };