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

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

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

```ts
import type { GeoMapApi } 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 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;` |  |  |
