# tile-calc

> JavaScript functions for working with slippy map tiles.

Latest version **1.0.0** (published 2016-07-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install tile-calc
pnpm add tile-calc
yarn add tile-calc
bun add tile-calc
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2016-07-07 |
| First published | 2016-07-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | * |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Aaron Blondeau |
| Maintainers | aaronblondeau |
| Keywords | map, tile, open street map, leaflet |

## Links

- npm: https://www.npmjs.com/package/tile-calc
- Repository: https://github.com/aaronblondeau/tile-calc
- Issues: https://github.com/aaronblondeau/tile-calc/issues
- npm.io page: https://npm.io/package/tile-calc

## Recent versions

- 1.0.0 (latest) — 2016-07-07

## README

# tile-calc

JavaScript functions for working with map tiles.  Designed to work in both node.js and web browsers.

## Installation

### Node

    npm install tile-calc

And in your code:

    var TileCalc = require('tile-calc')

### Browser

    <script type="text/javascript" src="../tile-calc.js"></script>

## Tile Format

tile-calc represents each tile as an array of numbers : [x, y, z]

## Examples

Get latitude and longitude bounds for a tile

    TileCalc.getTileBounds(3368, 6288, 14);

Get all the parents of a tile

	TileCalc.getAllAncestorTiles(3368, 6288, 14);

Get the direct children of a tile

	TileCalc.getChildTiles(3368, 6288, 14);

Get the entire family tree of a tile (from min zoom of 5 to max zoom of 15)

	TileCalc.getAllRelatedTiles(3368, 6288, 14, 5, 15);

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