mapKeysfunction
The keys of the tiles that cover a place at a detail, on the package's pyramid: the level is the lowest whose width is at least detail pixels round (or the finest there is), and the tiles are every one the place touches.
Pure. A source of your own can build its need on it.
Import it
import { mapKeys } from "@johnmorrisdotca/chikyu-earth/door";
Definition
function mapKeys(place: MapPlace, detail: number, layer?: TileLayer, prefix?: string): string[]
Parameters
| Name | Type | Description |
|---|---|---|
place | MapPlace | The part of the map, in degrees. |
detail | number | The pixels across the whole circumference wanted. |
layer (optional) | TileLayer | The levels the source has; |
prefix (optional) | string | Put before each key ( |
Returns
string[]
The keys, [<prefix>]level/column/row, row by row; none for a place with no area.
Examples
import { mapKeys } from "@johnmorrisdotca/chikyu-earth/door";
console.log(mapKeys({ lonMin: -10, lonMax: 10, latMin: -5, latMax: 5 }, 8192));[ '3/7/3', '3/8/3', '3/7/4', '3/8/4' ]What it prints (run when this page was built)