map-with-circle-marker

PreviousNext
Docs
shadcn-mapexample

Preview

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

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

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

Installation

npx shadcn@latest add @shadcn-map/map-with-circle-marker

Usage

import { MapWithCircleMarker } from "@/components/map-with-circle-marker"
<MapWithCircleMarker />