UNPKG

s2maps-gpu

Version:

S2 Maps GPU - An open source, high-performance, and GPU-accelerated map engine for rendering large-scale, interactive maps.

25 lines (24 loc) 740 B
import type { S2Map, ViewMessage } from 's2/index.js'; /** Handle the sync move event */ export type SyncMoveListener = (event: CustomEvent<ViewMessage>) => void; /** Containers for the maps and their listeners */ export interface MapContainer { id: string; map: S2Map; onMove: SyncMoveListener; } /** * Sync the camera between multiple maps * ex. * ```ts * import { syncMove } from 's2maps-gpu/plugins'; * // create multiple maps * const mapA = new S2Map({ ... }); * const mapB = new S2Map({ ... }); * const mapC = new S2Map({ ... }); * // sync the maps * await syncMove(mapA, mapB, mapC); * ``` * @param maps - The maps to sync with eachother */ export declare function syncMove(...maps: S2Map[]): Promise<void>;