# @types/mapbox__sphericalmercator

> TypeScript definitions for @mapbox/sphericalmercator

Latest version **1.2.3** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/mapbox__sphericalmercator
pnpm add @types/mapbox__sphericalmercator
yarn add @types/mapbox__sphericalmercator
bun add @types/mapbox__sphericalmercator
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.2.3 |
| Published | 2023-11-07 |
| First published | 2019-02-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51442 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/mapbox__sphericalmercator
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/mapbox__sphericalmercator
- npm.io page: https://npm.io/package/@types/mapbox__sphericalmercator

## Recent versions

- 1.2.3 (latest) — 2023-11-07
- 1.2.0 (ts3.9) — 2022-04-21
- 1.1.5 (ts3.6) — 2021-07-08
- 1.1.4 (ts3.2) — 2020-09-26
- 1.1.3 (ts2.0) — 2019-05-20
- 1.2.2 — 2023-10-18
- 1.2.1 — 2023-09-27
- 1.1.2 — 2019-03-12
- 1.1.1 — 2019-02-13
- 1.1.0 — 2019-02-13

## README

# 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](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/mapbox__sphericalmercator/index.d.ts)
````ts
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: Tue, 07 Nov 2023 09:09:39 GMT
 * Dependencies: none

# Credits
These definitions were written by [Nicholas Husher](https://github.com/nhusher), and [Michael Bullington](https://github.com/mbullington).

---
_Source: https://npm.io/package/@types/mapbox__sphericalmercator · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
