import { GeoJson } from "../lib/GeoJsonDataType"; import { WorkerServiceProtocol } from "./WorkerServiceProtocol"; /** * Communication protocol with {@link ITiler}. */ export declare namespace WorkerTilerProtocol { /** * Define possible names of requests called on tiler services within `WebWorker`. */ enum Requests { RegisterIndex = "register-index", UpdateIndex = "update-index", TileRequest = "tile-request" } /** * This object is sent to the tiler to register a new tile index in the worker. */ interface RegisterIndexRequest extends WorkerServiceProtocol.ServiceRequest { type: Requests.RegisterIndex; id: string; input: string | GeoJson; } /** * Type guard to check if an object is an index registration request sent to a worker. */ function isRegisterIndexRequest(message: any): message is RegisterIndexRequest; /** * This object is sent to the tiler to register a new tile index in the worker. */ interface UpdateIndexRequest extends WorkerServiceProtocol.ServiceRequest { type: Requests.UpdateIndex; id: string; input: string | GeoJson; } /** * Type guard to check if an object is an update request for the index registration. */ function isUpdateIndexRequest(message: any): message is UpdateIndexRequest; /** * This object is sent to the tiler asking to retrieve a specific tile. The expected response * type is an object containing a tiled payload. */ interface TileRequest extends WorkerServiceProtocol.ServiceRequest { type: Requests.TileRequest; index: string; tileKey: number; } /** * Type guard to check if an object is a tile request sent to a worker. */ function isTileRequest(message: any): message is TileRequest; } //# sourceMappingURL=WorkerTilerProtocol.d.ts.map