UNPKG

1.26 kBTypeScriptView Raw
1import { Extent } from './extent';
2import Corner from './extent/Corner';
3import { ProjectionLike } from './proj';
4import Projection from './proj/Projection';
5import { Size } from './size';
6import { TileCoord } from './tilecoord';
7import TileGrid from './tilegrid/TileGrid';
8
9export interface XYZOptions {
10 extent?: Extent;
11 maxResolution?: number;
12 maxZoom?: number;
13 minZoom?: number;
14 tileSize?: number | Size;
15}
16export function createForExtent(
17 extent: Extent,
18 opt_maxZoom?: number,
19 opt_tileSize?: number | Size,
20 opt_corner?: Corner,
21): TileGrid;
22export function createForProjection(
23 projection: ProjectionLike,
24 opt_maxZoom?: number,
25 opt_tileSize?: number | Size,
26 opt_corner?: Corner,
27): TileGrid;
28/**
29 * Creates a tile grid with a standard XYZ tiling scheme.
30 */
31export function createXYZ(opt_options?: XYZOptions): TileGrid;
32/**
33 * Generate a tile grid extent from a projection. If the projection has an
34 * extent, it is used. If not, a global extent is assumed.
35 */
36export function extentFromProjection(projection: ProjectionLike): Extent;
37export function getForProjection(projection: Projection): TileGrid;
38export function wrapX(tileGrid: TileGrid, tileCoord: TileCoord, projection: Projection): TileCoord;