interface Vec2 { x: number; y: number; } /** * Coordinates in [-1 ... +1]. * Left bottom is (-1; -1). * Right top is (+1; +1). * Center is (0; 0). */ interface WorldCoordinates extends Vec2 { readonly type?: 'world'; z?: number; } /** * Global pixel coordinates. World size depends on zoom. * Left top is (0; 0). * Right bottom is (2**(zoom + 8); 2**(zoom + 8)). */ interface PixelCoordinates extends Vec2 { readonly type?: 'pixel'; } /** * Converts world coordinates to pixel coordinates. Pixels are in (0, 0) (width, height) range. */ declare function worldToPixels(coordinates: WorldCoordinates, zoom: number): PixelCoordinates; /** * Converts pixels in (0, 0) (width, height) to world coordinates. */ declare function pixelsToWorld(pixels: PixelCoordinates, zoom: number): WorldCoordinates; export { pixelsToWorld, worldToPixels };