# GeoMapProps (@salmonui/charts/geo-map)

> The GeoMapProps interface of @salmonui/charts/geo-map.

Canonical: https://salmonui.dev/docs/reference/charts/geo-map/GeoMapProps

```ts
import type { GeoMapProps } from '@salmonui/charts/geo-map';
```

Entry index: https://salmonui.dev/docs/reference/charts/geo-map (Markdown with every symbol of the entry: https://salmonui.dev/docs/reference/charts/geo-map.md).

## Reference

Kind: interface

```ts
interface GeoMapProps<T = unknown> {
    readonly layers?: readonly GeoMapLayer<T>[] | undefined;
    readonly children?: ReactNode;
    readonly animated?: boolean | undefined;
    readonly projection?: ProjectionName | undefined;
    readonly width?: number | undefined;
    readonly height?: number | undefined;
    readonly title?: string | undefined;
    readonly subtitle?: string | undefined;
    readonly description?: string | undefined;
    readonly locale?: string | undefined;
    readonly text?: Partial<GeoMapText> | undefined;
    readonly fitTo?: 'markers' | readonly [
        LatLon,
        LatLon
    ] | undefined;
    readonly view?: GeoMapView | undefined;
    readonly defaultView?: GeoMapView | undefined;
    readonly onViewChange?: ((view: GeoMapView, event: GeoMapChangeEvent) => void) | undefined;
    readonly activeLayer?: string | undefined;
    readonly defaultActiveLayer?: string | undefined;
    readonly onActiveLayerChange?: ((id: string, event: GeoMapChangeEvent) => void) | undefined;
    readonly selection?: boolean | {
        readonly multiple?: boolean | undefined;
    } | undefined;
    readonly selectedShapes?: readonly string[] | undefined;
    readonly defaultSelectedShapes?: readonly string[] | undefined;
    readonly onSelectedShapesChange?: ((keys: readonly string[], event: GeoMapChangeEvent) => void) | undefined;
    readonly highlight?: boolean | undefined;
    readonly zoom?: boolean | GeoMapZoomOptions | undefined;
    readonly pan?: boolean | undefined;
    readonly tooltip?: boolean | {
        readonly trigger?: 'hover' | 'click' | undefined;
        readonly render?: ((ctx: GeoMapTooltipContext) => ReactNode) | undefined;
    } | undefined;
    readonly legend?: boolean | GeoMapLegendOptions | undefined;
    readonly annotations?: readonly GeoMapAnnotation[] | undefined;
    readonly onShapeClick?: ((ctx: {
        readonly layerId: string;
        readonly key: string;
        readonly name: string;
        readonly datum: unknown;
    }) => void) | undefined;
    readonly onMarkerClick?: ((ctx: GeoMapMarkerContext) => void) | undefined;
    readonly onClusterClick?: ((ctx: GeoMapClusterContext) => void) | undefined;
    readonly onMarkerMove?: ((move: GeoMapMarkerMove, event: GeoMapChangeEvent) => void) | undefined;
    readonly onBubbleClick?: ((ctx: {
        readonly layerId: string;
        readonly key: string;
        readonly value: unknown;
        readonly datum: unknown;
    }) => void) | undefined;
    readonly onMapClick?: ((position: {
        readonly latitude: number;
        readonly longitude: number;
    }) => void) | undefined;
    readonly showDataTable?: boolean | undefined;
    readonly className?: string | undefined;
    readonly style?: CSSProperties | undefined;
    readonly ref?: Ref<GeoMapApi> | undefined;
    readonly id?: string | undefined;
    readonly 'data-testid'?: string | undefined;
}
```

Members (40):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `layers` | `readonly layers?: readonly GeoMapLayer<T>[] \| undefined;` | optional | The layers; or `GeoMapLayer` children, read when `layers` is absent. |
| `children` | `readonly children?: ReactNode;` | optional |  |
| `animated` | `readonly animated?: boolean \| undefined;` | optional | Entrance transition (`@salmonui/charts/viz-animations.css`); default true. |
| `projection` | `readonly projection?: ProjectionName \| undefined;` | optional |  |
| `width` | `readonly width?: number \| undefined;` | optional | Drawing size in px (default 600 x 400); the map scales to its container through `viewBox`. |
| `height` | `readonly height?: number \| undefined;` | optional |  |
| `title` | `readonly title?: string \| undefined;` | optional |  |
| `subtitle` | `readonly subtitle?: string \| undefined;` | optional |  |
| `description` | `readonly description?: string \| undefined;` | optional |  |
| `locale` | `readonly locale?: string \| undefined;` | optional |  |
| `text` | `readonly text?: Partial<GeoMapText> \| undefined;` | optional | Built-in text (over the nearest `LocaleProvider`'s `geoMap` entry). |
| `fitTo` | `readonly fitTo?: 'markers' \| readonly [     LatLon,     LatLon ] \| undefined;` | optional | Initial frame: fit every marker or `[[lat, lon], [lat, lon]]` bounds instead of the base layer. |
| `view` | `readonly view?: GeoMapView \| undefined;` | optional |  |
| `defaultView` | `readonly defaultView?: GeoMapView \| undefined;` | optional |  |
| `onViewChange` | `readonly onViewChange?: ((view: GeoMapView, event: GeoMapChangeEvent) => void) \| undefined;` | optional |  |
| `activeLayer` | `readonly activeLayer?: string \| undefined;` | optional |  |
| `defaultActiveLayer` | `readonly defaultActiveLayer?: string \| undefined;` | optional |  |
| `onActiveLayerChange` | `readonly onActiveLayerChange?: ((id: string, event: GeoMapChangeEvent) => void) \| undefined;` | optional |  |
| `selection` | `readonly selection?: boolean \| {     readonly multiple?: boolean \| undefined; } \| undefined;` | optional | Shape selection (default single); `false` disables it. |
| `selectedShapes` | `readonly selectedShapes?: readonly string[] \| undefined;` | optional |  |
| `defaultSelectedShapes` | `readonly defaultSelectedShapes?: readonly string[] \| undefined;` | optional |  |
| `onSelectedShapesChange` | `readonly onSelectedShapesChange?: ((keys: readonly string[], event: GeoMapChangeEvent) => void) \| undefined;` | optional |  |
| `highlight` | `readonly highlight?: boolean \| undefined;` | optional | Hover highlight of shapes (default true). |
| `zoom` | `readonly zoom?: boolean \| GeoMapZoomOptions \| undefined;` | optional |  |
| `pan` | `readonly pan?: boolean \| undefined;` | optional | Drag and Ctrl+arrow panning (default true when zoom is on). |
| `tooltip` | `readonly tooltip?: boolean \| {     readonly trigger?: 'hover' \| 'click' \| undefined;     readonly render?: ((ctx: GeoMapTooltipContext) => ReactNode) \| undefined; } \| undefined;` | optional |  |
| `legend` | `readonly legend?: boolean \| GeoMapLegendOptions \| undefined;` | optional |  |
| `annotations` | `readonly annotations?: readonly GeoMapAnnotation[] \| undefined;` | optional |  |
| `onShapeClick` | `readonly onShapeClick?: ((ctx: {     readonly layerId: string;     readonly key: string;     readonly name: string;     readonly datum: unknown; }) => void) \| undefined;` | optional |  |
| `onMarkerClick` | `readonly onMarkerClick?: ((ctx: GeoMapMarkerContext) => void) \| undefined;` | optional |  |
| `onClusterClick` | `readonly onClusterClick?: ((ctx: GeoMapClusterContext) => void) \| undefined;` | optional |  |
| `onMarkerMove` | `readonly onMarkerMove?: ((move: GeoMapMarkerMove, event: GeoMapChangeEvent) => void) \| undefined;` | optional | A draggable marker was dropped (pointer release) or moved by an arrow key; update the marker data. |
| `onBubbleClick` | `readonly onBubbleClick?: ((ctx: {     readonly layerId: string;     readonly key: string;     readonly value: unknown;     readonly datum: unknown; }) => void) \| undefined;` | optional |  |
| `onMapClick` | `readonly onMapClick?: ((position: {     readonly latitude: number;     readonly longitude: number; }) => void) \| undefined;` | optional |  |
| `showDataTable` | `readonly showDataTable?: boolean \| undefined;` | optional |  |
| `className` | `readonly className?: string \| undefined;` | optional |  |
| `style` | `readonly style?: CSSProperties \| undefined;` | optional |  |
| `ref` | `readonly ref?: Ref<GeoMapApi> \| undefined;` | optional |  |
| `id` | `readonly id?: string \| undefined;` | optional |  |
| `data-testid` | `readonly 'data-testid'?: string \| undefined;` | optional |  |
