# @salmonui/charts/geo-map API reference

> 32 exported symbols of @salmonui/charts/geo-map: 2 components, 25 interfaces and 5 types.

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

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

## Components

### GeoMap

Kind: component

Page: https://salmonui.dev/docs/reference/charts/geo-map/GeoMap

```ts
function GeoMap<T = unknown>(props: GeoMapProps<T>): ReactNode;
```

Props: [`GeoMapProps`](https://salmonui.dev/docs/reference/charts/geo-map/GeoMapProps) (its members are the props)

### GeoMapLayer

Kind: component

Page: https://salmonui.dev/docs/reference/charts/geo-map/GeoMapLayer

```ts
function GeoMapLayer<T = unknown>(_props: GeoMapLayer<T>): null;

interface GeoMapLayer<T = unknown> {
    readonly id?: string | undefined;
    readonly kind?: 'base' | 'overlay' | undefined;
    readonly name?: string | undefined;
    readonly shapes?: GeoJSON | undefined;
    readonly geometry?: 'geographic' | 'planar' | undefined;
    readonly data?: readonly T[] | undefined;
    readonly dataKey?: string | undefined;
    readonly shapeKey?: string | undefined;
    readonly color?: string | undefined;
    readonly palette?: readonly string[] | undefined;
    readonly colorScale?: GeoMapColorScale | undefined;
    readonly getShapeStyle?: ((ctx: GeoMapShapeContext<T>) => GeoMapStyle | undefined) | undefined;
    readonly markers?: GeoMapMarkers | readonly GeoMapMarkers[] | undefined;
    readonly bubbles?: GeoMapBubbles | undefined;
    readonly labels?: GeoMapLabels | boolean | undefined;
    readonly routes?: readonly GeoMapRoute[] | undefined;
    readonly polygons?: readonly GeoMapPolygon[] | undefined;
    readonly tiles?: GeoMapTiles | undefined;
}
```

A layer as a child of `GeoMap` (same fields as a `layers` entry).
Renders nothing: `GeoMap` reads the props of its direct children.

## Interfaces

### GeoFeature

Kind: interface

Page: https://salmonui.dev/docs/reference/charts/geo-map/GeoFeature

```ts
interface GeoFeature {
    readonly type: 'Feature';
    readonly id?: string | number | undefined;
    readonly geometry: GeoGeometry | null;
    readonly properties?: Readonly<Record<string, unknown>> | null;
}
```

Members (4):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `type` | `readonly type: 'Feature';` |  |  |
| `id` | `readonly id?: string \| number \| undefined;` | optional |  |
| `geometry` | `readonly geometry: GeoGeometry \| null;` |  |  |
| `properties` | `readonly properties?: Readonly<Record<string, unknown>> \| null;` | optional |  |

### GeoFeatureCollection

Kind: interface

Page: https://salmonui.dev/docs/reference/charts/geo-map/GeoFeatureCollection

```ts
interface GeoFeatureCollection {
    readonly type: 'FeatureCollection';
    readonly features: readonly GeoFeature[];
}
```

Members (2):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `type` | `readonly type: 'FeatureCollection';` |  |  |
| `features` | `readonly features: readonly GeoFeature[];` |  |  |

### GeoGeometry

Kind: interface

Page: https://salmonui.dev/docs/reference/charts/geo-map/GeoGeometry

```ts
interface GeoGeometry {
    readonly type: 'Point' | 'MultiPoint' | 'LineString' | 'MultiLineString' | 'Polygon' | 'MultiPolygon' | 'GeometryCollection';
    readonly coordinates?: unknown;
    readonly geometries?: readonly GeoGeometry[];
}
```

Members (3):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `type` | `readonly type: 'Point' \| 'MultiPoint' \| 'LineString' \| 'MultiLineString' \| 'Polygon' \| 'MultiPolygon' \| 'GeometryCollection';` |  |  |
| `coordinates` | `readonly coordinates?: unknown;` | optional |  |
| `geometries` | `readonly geometries?: readonly GeoGeometry[];` | optional |  |

### GeoMapAnnotation

Kind: interface

Page: https://salmonui.dev/docs/reference/charts/geo-map/GeoMapAnnotation

```ts
interface GeoMapAnnotation {
    readonly id?: string | undefined;
    readonly x: number | string;
    readonly y: number | string;
    readonly content: ReactNode;
    readonly align?: 'start' | 'center' | 'end' | undefined;
}
```

Members (5):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `id` | `readonly id?: string \| undefined;` | optional |  |
| `x` | `readonly x: number \| string;` |  | Position in the drawing: px numbers or percentages (`'50%'`). |
| `y` | `readonly y: number \| string;` |  |  |
| `content` | `readonly content: ReactNode;` |  |  |
| `align` | `readonly align?: 'start' \| 'center' \| 'end' \| undefined;` | optional |  |

### GeoMapApi

Kind: interface

Page: https://salmonui.dev/docs/reference/charts/geo-map/GeoMapApi

```ts
interface GeoMapApi {
    readonly element: HTMLElement | null;
    fitBounds(bounds: readonly [
        LatLon,
        LatLon
    ] | 'markers'): void;
    panBy(direction: 'up' | 'down' | 'left' | 'right', fraction?: number): void;
    toCoordinates(point: {
        readonly x: number;
        readonly y: number;
    }): {
        latitude: number;
        longitude: number;
    };
    toPoint(position: LatLon): {
        x: number;
        y: number;
    };
    export(options?: {
        readonly format?: 'png' | 'jpeg' | 'svg' | undefined;
        readonly fileName?: string | undefined;
        readonly scale?: number | undefined;
    }): Promise<void>;
    toBlob(format?: 'png' | 'jpeg' | 'svg'): Promise<Blob>;
    toDataURL(format?: 'png' | 'jpeg' | 'svg'): Promise<string>;
    toSVGString(): string;
    print(): Promise<void>;
    focus(): void;
}
```

Members (11):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `element` | `readonly element: HTMLElement \| null;` |  |  |
| `fitBounds` | `fitBounds(bounds: readonly [     LatLon,     LatLon ] \| 'markers'): void;` |  | Fits the view to `[[lat, lon], [lat, lon]]` bounds or to every marker. |
| `panBy` | `panBy(direction: 'up' \| 'down' \| 'left' \| 'right', fraction?: number): void;` |  |  |
| `toCoordinates` | `toCoordinates(point: {     readonly x: number;     readonly y: number; }): {     latitude: number;     longitude: number; };` |  | Drawing coordinates (px) to `{ latitude, longitude }`. |
| `toPoint` | `toPoint(position: LatLon): {     x: number;     y: number; };` |  | `[latitude, longitude]` to drawing coordinates (px). |
| `export` | `export(options?: {     readonly format?: 'png' \| 'jpeg' \| 'svg' \| undefined;     readonly fileName?: string \| undefined;     readonly scale?: number \| undefined; }): Promise<void>;` |  |  |
| `toBlob` | `toBlob(format?: 'png' \| 'jpeg' \| 'svg'): Promise<Blob>;` |  |  |
| `toDataURL` | `toDataURL(format?: 'png' \| 'jpeg' \| 'svg'): Promise<string>;` |  |  |
| `toSVGString` | `toSVGString(): string;` |  |  |
| `print` | `print(): Promise<void>;` |  |  |
| `focus` | `focus(): void;` |  |  |

### GeoMapBubbles

Kind: interface

Page: https://salmonui.dev/docs/reference/charts/geo-map/GeoMapBubbles

```ts
interface GeoMapBubbles {
    readonly valueField: string;
    readonly radius?: readonly [
        number,
        number
    ] | undefined;
    readonly shape?: 'circle' | 'square' | undefined;
    readonly color?: string | undefined;
    readonly colorScale?: GeoMapColorScale | undefined;
    readonly label?: string | undefined;
}
```

Members (6):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `valueField` | `readonly valueField: string;` |  | Field of the joined data row whose value sizes the bubble. |
| `radius` | `readonly radius?: readonly [     number,     number ] \| undefined;` | optional | Radius range in px (default `[4, 24]`), area proportional to the value. |
| `shape` | `readonly shape?: 'circle' \| 'square' \| undefined;` | optional |  |
| `color` | `readonly color?: string \| undefined;` | optional |  |
| `colorScale` | `readonly colorScale?: GeoMapColorScale \| undefined;` | optional |  |
| `label` | `readonly label?: string \| undefined;` | optional |  |

### GeoMapChangeEvent

Kind: interface

Page: https://salmonui.dev/docs/reference/charts/geo-map/GeoMapChangeEvent

```ts
interface GeoMapChangeEvent {
    readonly source: GeoMapChangeSource;
    readonly reason: 'zoom' | 'pan' | 'reset' | 'fit' | 'select' | 'layer' | 'move';
}
```

Members (2):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `source` | `readonly source: GeoMapChangeSource;` |  |  |
| `reason` | `readonly reason: 'zoom' \| 'pan' \| 'reset' \| 'fit' \| 'select' \| 'layer' \| 'move';` |  |  |

### GeoMapClusterContext

Kind: interface

Page: https://salmonui.dev/docs/reference/charts/geo-map/GeoMapClusterContext

```ts
interface GeoMapClusterContext {
    readonly layerId: string;
    readonly groupId: string;
    readonly count: number;
    readonly latitude: number;
    readonly longitude: number;
    readonly members: readonly number[];
}
```

Members (6):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `layerId` | `readonly layerId: string;` |  |  |
| `groupId` | `readonly groupId: string;` |  |  |
| `count` | `readonly count: number;` |  |  |
| `latitude` | `readonly latitude: number;` |  |  |
| `longitude` | `readonly longitude: number;` |  |  |
| `members` | `readonly members: readonly number[];` |  |  |

### GeoMapColorScale

Kind: interface

Page: https://salmonui.dev/docs/reference/charts/geo-map/GeoMapColorScale

```ts
interface GeoMapColorScale {
    readonly kind: 'range' | 'value' | 'opacity';
    readonly field: string;
    readonly stops?: readonly GeoMapColorStop[] | undefined;
    readonly color?: string | undefined;
    readonly opacity?: readonly [
        number,
        number
    ] | undefined;
}
```

Members (5):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `kind` | `readonly kind: 'range' \| 'value' \| 'opacity';` |  |  |
| `field` | `readonly field: string;` |  | Field of the joined data row (or of the feature properties). |
| `stops` | `readonly stops?: readonly GeoMapColorStop[] \| undefined;` | optional |  |
| `color` | `readonly color?: string \| undefined;` | optional | Opacity scale: the color and its `[min, max]` opacity across the field's range. |
| `opacity` | `readonly opacity?: readonly [     number,     number ] \| undefined;` | optional |  |

### GeoMapColorStop

Kind: interface

Page: https://salmonui.dev/docs/reference/charts/geo-map/GeoMapColorStop

```ts
interface GeoMapColorStop {
    readonly from?: number | undefined;
    readonly to?: number | undefined;
    readonly value?: unknown;
    readonly color?: string | undefined;
    readonly opacity?: number | undefined;
    readonly label?: string | undefined;
}
```

Members (6):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `from` | `readonly from?: number \| undefined;` | optional | Range stops: `from` (inclusive) and `to` (exclusive, the last one inclusive). |
| `to` | `readonly to?: number \| undefined;` | optional |  |
| `value` | `readonly value?: unknown;` | optional | Value stops: equality with the field value. |
| `color` | `readonly color?: string \| undefined;` | optional | Data color. Opacity scales use `opacity` with the scale `color`. |
| `opacity` | `readonly opacity?: number \| undefined;` | optional |  |
| `label` | `readonly label?: string \| undefined;` | optional | Legend text (default the range or value). |

### GeoMapLabels

Kind: interface

Page: https://salmonui.dev/docs/reference/charts/geo-map/GeoMapLabels

```ts
interface GeoMapLabels {
    readonly field?: string | undefined;
    readonly overflow?: 'none' | 'hide' | 'trim' | undefined;
    readonly overlap?: 'hide' | 'show' | undefined;
    readonly render?: ((ctx: {
        readonly key: string;
        readonly name: string;
        readonly text: string;
        readonly datum: unknown;
    }) => unknown) | undefined;
}
```

Members (4):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `field` | `readonly field?: string \| undefined;` | optional | Field of the joined data row or of the feature properties (default the shape name). |
| `overflow` | `readonly overflow?: 'none' \| 'hide' \| 'trim' \| undefined;` | optional | `'hide'` drops labels wider than their shape, `'trim'` shortens them with an ellipsis. |
| `overlap` | `readonly overlap?: 'hide' \| 'show' \| undefined;` | optional | `'hide'` drops a label that overlaps an earlier one (default). |
| `render` | `readonly render?: ((ctx: {     readonly key: string;     readonly name: string;     readonly text: string;     readonly datum: unknown; }) => unknown) \| undefined;` | optional | Custom label content centered on the shape (replaces the text). |

### GeoMapLegendOptions

Kind: interface

Page: https://salmonui.dev/docs/reference/charts/geo-map/GeoMapLegendOptions

```ts
interface GeoMapLegendOptions {
    readonly source?: 'shapes' | 'bubbles' | 'markers' | undefined;
    readonly mode?: 'list' | 'interactive' | undefined;
    readonly title?: string | undefined;
    readonly position?: 'top' | 'bottom' | 'start' | 'end' | 'float' | undefined;
    readonly x?: number | undefined;
    readonly y?: number | undefined;
}
```

Members (6):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `source` | `readonly source?: 'shapes' \| 'bubbles' \| 'markers' \| undefined;` | optional |  |
| `mode` | `readonly mode?: 'list' \| 'interactive' \| undefined;` | optional | `'interactive'` (default) toggles items; `'list'` only lists them. |
| `title` | `readonly title?: string \| undefined;` | optional |  |
| `position` | `readonly position?: 'top' \| 'bottom' \| 'start' \| 'end' \| 'float' \| undefined;` | optional | Default `'bottom'`; `'float'` draws the legend over the map at `x`, `y` (px, default 8). |
| `x` | `readonly x?: number \| undefined;` | optional |  |
| `y` | `readonly y?: number \| undefined;` | optional |  |

### GeoMapMarkerContext

Kind: interface

Page: https://salmonui.dev/docs/reference/charts/geo-map/GeoMapMarkerContext

```ts
interface GeoMapMarkerContext<T = unknown> {
    readonly layerId: string;
    readonly groupId: string;
    readonly index: number;
    readonly datum: T;
    readonly latitude: number;
    readonly longitude: number;
}
```

Members (6):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `layerId` | `readonly layerId: string;` |  |  |
| `groupId` | `readonly groupId: string;` |  |  |
| `index` | `readonly index: number;` |  |  |
| `datum` | `readonly datum: T;` |  |  |
| `latitude` | `readonly latitude: number;` |  |  |
| `longitude` | `readonly longitude: number;` |  |  |

### GeoMapMarkerMove

Kind: interface

Page: https://salmonui.dev/docs/reference/charts/geo-map/GeoMapMarkerMove

```ts
interface GeoMapMarkerMove {
    readonly markerId: string;
    readonly layerId: string;
    readonly groupId: string;
    readonly index: number;
    readonly datum: unknown;
    readonly latitude: number;
    readonly longitude: number;
}
```

`onMarkerMove` payload: where a draggable marker was dropped.

Members (7):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `markerId` | `readonly markerId: string;` |  | `<groupId>:<index>`. |
| `layerId` | `readonly layerId: string;` |  |  |
| `groupId` | `readonly groupId: string;` |  |  |
| `index` | `readonly index: number;` |  |  |
| `datum` | `readonly datum: unknown;` |  |  |
| `latitude` | `readonly latitude: number;` |  |  |
| `longitude` | `readonly longitude: number;` |  |  |

### GeoMapMarkers

Kind: interface

Page: https://salmonui.dev/docs/reference/charts/geo-map/GeoMapMarkers

```ts
interface GeoMapMarkers<T = unknown> {
    readonly id?: string | undefined;
    readonly data: readonly T[];
    readonly latitudeField?: string | undefined;
    readonly longitudeField?: string | undefined;
    readonly shape?: GeoMapMarkerShape | undefined;
    readonly size?: number | undefined;
    readonly sizeField?: string | undefined;
    readonly sizeRange?: readonly [
        number,
        number
    ] | undefined;
    readonly color?: string | undefined;
    readonly colorField?: string | undefined;
    readonly labelField?: string | undefined;
    readonly label?: string | undefined;
    readonly render?: ((ctx: GeoMapMarkerContext<T>) => unknown) | undefined;
    readonly getStyle?: ((ctx: GeoMapMarkerContext<T>) => GeoMapStyle | undefined) | undefined;
    readonly cluster?: boolean | {
        readonly cell?: number | undefined;
        readonly expand?: 'zoom' | 'spider' | 'none' | undefined;
        readonly render?: ((ctx: GeoMapClusterContext) => unknown) | undefined;
    } | undefined;
    readonly draggable?: boolean | undefined;
}
```

Members (16):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `id` | `readonly id?: string \| undefined;` | optional |  |
| `data` | `readonly data: readonly T[];` |  |  |
| `latitudeField` | `readonly latitudeField?: string \| undefined;` | optional |  |
| `longitudeField` | `readonly longitudeField?: string \| undefined;` | optional |  |
| `shape` | `readonly shape?: GeoMapMarkerShape \| undefined;` | optional |  |
| `size` | `readonly size?: number \| undefined;` | optional | Marker size in px (default 12) or a field scaled into `sizeRange`. |
| `sizeField` | `readonly sizeField?: string \| undefined;` | optional |  |
| `sizeRange` | `readonly sizeRange?: readonly [     number,     number ] \| undefined;` | optional |  |
| `color` | `readonly color?: string \| undefined;` | optional |  |
| `colorField` | `readonly colorField?: string \| undefined;` | optional | Field holding a data color per marker. |
| `labelField` | `readonly labelField?: string \| undefined;` | optional | Accessible and tooltip name. |
| `label` | `readonly label?: string \| undefined;` | optional | Legend text of the group. |
| `render` | `readonly render?: ((ctx: GeoMapMarkerContext<T>) => unknown) \| undefined;` | optional | Custom marker content (an image, an icon) centered on the position. |
| `getStyle` | `readonly getStyle?: ((ctx: GeoMapMarkerContext<T>) => GeoMapStyle \| undefined) \| undefined;` | optional |  |
| `cluster` | `readonly cluster?: boolean \| {     readonly cell?: number \| undefined;     readonly expand?: 'zoom' \| 'spider' \| 'none' \| undefined;     readonly render?: ((ctx: GeoMapClusterContext) => unknown) \| undefined; } \| undefined;` | optional | Grid clustering (recomputed per zoom level). A clicked cluster zooms in (`expand: 'zoom'`, default), fans its markers out around it with connector lines (`'spider'`, a second click or Escape closes it) or does nothing (`'none'`). |
| `draggable` | `readonly draggable?: boolean \| undefined;` | optional | Markers move by pointer drag and by arrow keys on their focusable handle; `onMarkerMove` reports the drop. |

### GeoMapPolygon

Kind: interface

Page: https://salmonui.dev/docs/reference/charts/geo-map/GeoMapPolygon

```ts
interface GeoMapPolygon {
    readonly id?: string | undefined;
    readonly points: readonly LatLon[];
    readonly color?: string | undefined;
    readonly label?: string | undefined;
}
```

Members (4):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `id` | `readonly id?: string \| undefined;` | optional |  |
| `points` | `readonly points: readonly LatLon[];` |  |  |
| `color` | `readonly color?: string \| undefined;` | optional |  |
| `label` | `readonly label?: string \| undefined;` | optional |  |

### GeoMapProps

Kind: interface

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

```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 |  |

### GeoMapRoute

Kind: interface

Page: https://salmonui.dev/docs/reference/charts/geo-map/GeoMapRoute

```ts
interface GeoMapRoute {
    readonly id?: string | undefined;
    readonly points: readonly LatLon[];
    readonly curvature?: number | undefined;
    readonly arrows?: 'none' | 'start' | 'end' | 'both' | undefined;
    readonly lineStyle?: 'solid' | 'dashed' | 'dotted' | undefined;
    readonly color?: string | undefined;
    readonly width?: number | undefined;
    readonly label?: string | undefined;
}
```

Members (8):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `id` | `readonly id?: string \| undefined;` | optional |  |
| `points` | `readonly points: readonly LatLon[];` |  | `[latitude, longitude]` points. |
| `curvature` | `readonly curvature?: number \| undefined;` | optional | Bend of each segment as a fraction of its length (0 = straight). |
| `arrows` | `readonly arrows?: 'none' \| 'start' \| 'end' \| 'both' \| undefined;` | optional |  |
| `lineStyle` | `readonly lineStyle?: 'solid' \| 'dashed' \| 'dotted' \| undefined;` | optional |  |
| `color` | `readonly color?: string \| undefined;` | optional |  |
| `width` | `readonly width?: number \| undefined;` | optional |  |
| `label` | `readonly label?: string \| undefined;` | optional |  |

### GeoMapShapeContext

Kind: interface

Page: https://salmonui.dev/docs/reference/charts/geo-map/GeoMapShapeContext

```ts
interface GeoMapShapeContext<T = unknown> {
    readonly layerId: string;
    readonly key: string;
    readonly name: string;
    readonly feature: GeoFeature;
    readonly datum: T | undefined;
    readonly selected: boolean;
}
```

Members (6):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `layerId` | `readonly layerId: string;` |  |  |
| `key` | `readonly key: string;` |  |  |
| `name` | `readonly name: string;` |  |  |
| `feature` | `readonly feature: GeoFeature;` |  |  |
| `datum` | `readonly datum: T \| undefined;` |  |  |
| `selected` | `readonly selected: boolean;` |  |  |

### GeoMapStyle

Kind: interface

Page: https://salmonui.dev/docs/reference/charts/geo-map/GeoMapStyle

```ts
interface GeoMapStyle {
    readonly fill?: string | undefined;
    readonly stroke?: string | undefined;
    readonly opacity?: number | undefined;
    readonly hidden?: boolean | undefined;
}
```

Members (4):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `fill` | `readonly fill?: string \| undefined;` | optional |  |
| `stroke` | `readonly stroke?: string \| undefined;` | optional |  |
| `opacity` | `readonly opacity?: number \| undefined;` | optional |  |
| `hidden` | `readonly hidden?: boolean \| undefined;` | optional |  |

### GeoMapText

Kind: interface

Page: https://salmonui.dev/docs/reference/charts/geo-map/GeoMapText

```ts
interface GeoMapText {
    readonly map: string;
    readonly movableMarker: string;
    readonly zoom: string;
    readonly zoomIn: string;
    readonly zoomOut: string;
    readonly resetZoom: string;
    readonly legend: string;
}
```

Built-in text of a GeoMap (`text` prop; the `geoMap` entry of a `LocaleProvider` catalog).

Members (7):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `map` | `readonly map: string;` |  | Name and role description of the map when there is no `title`. Default `"Map"`. |
| `movableMarker` | `readonly movableMarker: string;` |  | Role description of a draggable marker. |
| `zoom` | `readonly zoom: string;` |  | The zoom toolbar and its buttons. |
| `zoomIn` | `readonly zoomIn: string;` |  |  |
| `zoomOut` | `readonly zoomOut: string;` |  |  |
| `resetZoom` | `readonly resetZoom: string;` |  |  |
| `legend` | `readonly legend: string;` |  |  |

### GeoMapTiles

Kind: interface

Page: https://salmonui.dev/docs/reference/charts/geo-map/GeoMapTiles

```ts
interface GeoMapTiles {
    readonly url: string;
    readonly attribution: unknown;
    readonly minZoom?: number | undefined;
    readonly maxZoom?: number | undefined;
    readonly subdomains?: readonly string[] | undefined;
}
```

Members (5):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `url` | `readonly url: string;` |  | XYZ URL template: `https://tile.example.org/{z}/{x}/{y}.png` (`{s}` picks from `subdomains`). |
| `attribution` | `readonly attribution: unknown;` |  | Required: the provider's attribution, always rendered. |
| `minZoom` | `readonly minZoom?: number \| undefined;` | optional |  |
| `maxZoom` | `readonly maxZoom?: number \| undefined;` | optional |  |
| `subdomains` | `readonly subdomains?: readonly string[] \| undefined;` | optional |  |

### GeoMapTooltipContext

Kind: interface

Page: https://salmonui.dev/docs/reference/charts/geo-map/GeoMapTooltipContext

```ts
interface GeoMapTooltipContext {
    readonly target: 'shape' | 'marker' | 'bubble' | 'cluster';
    readonly layerId: string;
    readonly name: string;
    readonly datum: unknown;
    readonly value?: unknown;
}
```

Members (5):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `target` | `readonly target: 'shape' \| 'marker' \| 'bubble' \| 'cluster';` |  |  |
| `layerId` | `readonly layerId: string;` |  |  |
| `name` | `readonly name: string;` |  |  |
| `datum` | `readonly datum: unknown;` |  |  |
| `value` | `readonly value?: unknown;` | optional |  |

### GeoMapView

Kind: interface

Page: https://salmonui.dev/docs/reference/charts/geo-map/GeoMapView

```ts
interface GeoMapView {
    readonly center: LatLon;
    readonly zoom: number;
}
```

The map view: center `[latitude, longitude]` (planar maps: `[y, x]`) and zoom (1 = the fitted frame).

Members (2):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `center` | `readonly center: LatLon;` |  |  |
| `zoom` | `readonly zoom: number;` |  |  |

### GeoMapZoomOptions

Kind: interface

Page: https://salmonui.dev/docs/reference/charts/geo-map/GeoMapZoomOptions

```ts
interface GeoMapZoomOptions {
    readonly wheel?: boolean | undefined;
    readonly doubleClick?: boolean | undefined;
    readonly pinch?: boolean | undefined;
    readonly selection?: boolean | undefined;
    readonly toolbar?: boolean | undefined;
    readonly min?: number | undefined;
    readonly max?: number | undefined;
}
```

Members (7):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `wheel` | `readonly wheel?: boolean \| undefined;` | optional |  |
| `doubleClick` | `readonly doubleClick?: boolean \| undefined;` | optional |  |
| `pinch` | `readonly pinch?: boolean \| undefined;` | optional | Two-finger pinch (default true). |
| `selection` | `readonly selection?: boolean \| undefined;` | optional | Shift + drag draws a rectangle and zooms to it (default false). |
| `toolbar` | `readonly toolbar?: boolean \| undefined;` | optional | Zoom buttons over the map (default true). |
| `min` | `readonly min?: number \| undefined;` | optional |  |
| `max` | `readonly max?: number \| undefined;` | optional |  |

## Types

### GeoJSON

Kind: type

Page: https://salmonui.dev/docs/reference/charts/geo-map/GeoJSON

```ts
type GeoJSON = GeoFeatureCollection | GeoFeature | GeoGeometry;
```

### GeoMapChangeSource

Kind: type

Page: https://salmonui.dev/docs/reference/charts/geo-map/GeoMapChangeSource

```ts
type GeoMapChangeSource = 'pointer' | 'keyboard' | 'touch' | 'api';
```

### GeoMapMarkerShape

Kind: type

Page: https://salmonui.dev/docs/reference/charts/geo-map/GeoMapMarkerShape

```ts
type GeoMapMarkerShape = 'circle' | 'rectangle' | 'triangle' | 'invertedTriangle' | 'diamond' | 'pentagon' | 'star' | 'cross' | 'verticalLine' | 'horizontalLine' | 'balloon';
```

### GeoMapProjection

Kind: type

Page: https://salmonui.dev/docs/reference/charts/geo-map/GeoMapProjection

```ts
type ProjectionName = 'mercator' | 'equirectangular' | 'miller' | 'eckert3' | 'eckert5' | 'eckert6' | 'winkelTripel' | 'aitoff';
```

### LatLon

Kind: type

Page: https://salmonui.dev/docs/reference/charts/geo-map/LatLon

```ts
type LatLon = readonly [
    number,
    number
];
```

Members (3):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `0` | `0: number;` | inherited |  |
| `1` | `1: number;` | inherited |  |
| `length` | `length: 2;` | inherited |  |
