1.2.3 • Published 6 months ago

@types/mapbox__sphericalmercator v1.2.3

Weekly downloads
1,144
License
MIT
Repository
github
Last release
6 months ago

Installation

npm install --save @types/mapbox__sphericalmercator

Summary

This package contains type definitions for @mapbox/sphericalmercator (https://github.com/mapbox/sphericalmercator).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/mapbox__sphericalmercator.

index.d.ts

// Type definitions for @mapbox/sphericalmercator 1.2
// Project: https://github.com/mapbox/sphericalmercator, https://github.com/mapbox/node-sphericalmercator
// Definitions by: Nicholas Husher <https://github.com/nhusher>
//                 Michael Bullington <https://github.com/mbullington>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

export as namespace SphericalMercator;

interface XYBounds {
    minX: number;
    minY: number;
    maxX: number;
    maxY: number;
}

export {};

type LatLngPoint = [number, number];
type XYPoint = [number, number];
type BoundingBox = [number, number, number, number];
type Projection = 'WGS84' | '900913';

declare class SphericalMercator {
    constructor(options?: { size?: number | undefined, antimeridian?: boolean | undefined })
    px(ll: LatLngPoint, zoom: number): XYPoint;
    ll(px: XYPoint, zoom: number): LatLngPoint;
    bbox(x: number, y: number, zoom: number, tms_style?: boolean, srs?: Projection): BoundingBox;
    xyz(bbox: BoundingBox, zoom: number, tms_style?: boolean, srs?: Projection): XYBounds;
    convert(bbox: BoundingBox, to?: Projection): BoundingBox;
    forward(ll: LatLngPoint): XYPoint;
    inverse(xy: XYPoint): LatLngPoint;
}

export = SphericalMercator;

Additional Details

  • Last updated: Thu, 21 Apr 2022 18:31:42 GMT
  • Dependencies: none
  • Global values: SphericalMercator

Credits

These definitions were written by Nicholas Husher, and Michael Bullington.

1.2.3

6 months ago

1.2.2

7 months ago

1.2.1

8 months ago

1.2.0

2 years ago

1.1.5

3 years ago

1.1.4

4 years ago

1.1.3

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago