diff --git a/app/src/tiles/types.ts b/app/src/tiles/types.ts new file mode 100644 index 00000000..d2fccbef --- /dev/null +++ b/app/src/tiles/types.ts @@ -0,0 +1,43 @@ +import { Image } from 'mapnik'; + +/** + * Bounding box in the format [w, s, e, n] + */ +type BoundingBox = [number, number, number, number]; + +interface TileParams { + /** + * Name of tileset to which the tile belongs + */ + tileset: string; + + /** + * Zoom level + */ + z: number; + + /** + * X coordinate of tile (corresponds to longitude) + */ + x: number; + + /** + * Y coordinate of tile (corresponds to latitude) + */ + y: number; + + /** + * Resolution scale factor for higher pixel density tiles (e.g. x2) + */ + scale: number; +} + +interface TileRenderer { + getTile(tileParams: TileParams, dataParams: any): Promise +} + +export { + BoundingBox, + TileParams, + TileRenderer +};