API reference: @salmonui/charts/geo-map
GeoMapApiinterface
import type { GeoMapApi } from '@salmonui/charts/geo-map';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;
}
| Name | Signature | Description |
|---|---|---|
element | readonly element: HTMLElement | null; | |
fitBounds | fitBounds(bounds: readonly [
LatLon,
LatLon
] | 'markers'): void; | Fits the view to |
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 |
toPoint | toPoint(position: LatLon): {
x: number;
y: number;
}; |
|
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; |