リファレンス · データの入口(自分で用意した地球の地図や軌道データを、ライセンスと出典つきのソースとして渡し、いま画面にあるのは誰のデータかを示します)
earthTiles関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
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 { earthTiles } from "@johnmorrisdotca/chikyu-earth/door";
定義
function earthTiles(base: string, options?: EarthTilesOptions): EarthMapSource
引数
| 名前 | 型 | 説明 |
|---|---|---|
base | string | The folder's address, with or without the closing slash. |
options (省略可) | EarthTilesOptions | The |
戻り値
EarthMapSource
The source.
例
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));この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。