earthTilesfunction
The package's own finer map tiles as a source: a folder with a manifest.json and a tile for each layer, level and place at <layer>/<level>/<column>/<row>.webp (made by scripts/make-earth-tiles.py). This is what the tiles
attribute of <chikyu-earth-realistic> means, and what the Earth is drawn from where no source of yours covers a layer. It is for every layer in the folder (layer: "*"); the manifest says which levels each has, and it is read once
for the source, only when a view first wants more than the 4096 pixel picture. Its id is chikyu-tiles, and a view counts it as the package's own data.
Import it
import { earthTiles } from "@johnmorrisdotca/chikyu-earth/door";
Definition
function earthTiles(base: string, options?: EarthTilesOptions): EarthMapSource
Parameters
| Name | Type | Description |
|---|---|---|
base | string | The folder's address, with or without the closing slash. |
options (optional) | EarthTilesOptions | The |
Returns
EarthMapSource
The source.
Examples
import { earthTiles } from "@johnmorrisdotca/chikyu-earth/door";
const mine = earthTiles("/tiles/");
console.log(mine.need({ lonMin: 0, lonMax: 20, latMin: 0, latMax: 10, layer: "day" }, 8192));