basic-map

Next
Docs
shadcn-mapexample

Preview

Loading preview…
registry/new-york-v4/examples/basic-map.tsx
import { Map, MapTileLayer } from "@/registry/new-york-v4/ui/map"
import type { LatLngExpression } from "leaflet"

export function BasicMap() {
    const TORONTO_COORDINATES = [43.6532, -79.3832] satisfies LatLngExpression

    return (
        <Map center={TORONTO_COORDINATES}>
            <MapTileLayer />
        </Map>
    )
}

Installation

npx shadcn@latest add @shadcn-map/basic-map

Usage

import { BasicMap } from "@/components/basic-map"
<BasicMap />