Documentation / @interstellar-tools/maps / fromQuadkey
Function: fromQuadkey()
ts
function fromQuadkey(key: string): TileInterface;Defined in: tiles/quadkey.ts:81
Find the web map tile named by a quadkey: the inverse of quadkey.
Units
- Input: a string of digits 0–3, one per zoom level.
- Output:
{ x, y, z }, integer tile indices, withzthe key's length.
Notes
- Each digit adds one bit to the column (1 or 3) and the row (2 or 3).
- The empty key
''is the single tile at zoom 0.
Parameters
| Parameter | Type | Description |
|---|---|---|
key | string | The quadkey: at most 30 digits 0–3. |
Returns
The tile, { x, y, z }.
Throws
If key holds anything but the digits 0–3, or more than 30 of them.
Example
ts
fromQuadkey('213'); // { x: 3, y: 5, z: 3 }See
- quadkey
- tileBounds
- https://learn.microsoft.com/en-us/bingmaps/articles/bing-maps-tile-system Microsoft: Bing Maps tile system