本文へ移動

Chikyu Earth地球

世界の国の輪郭を線で描いた地球儀です。地球と同じ速さで回ります。宇宙から見たような地球と、好きな場所の目印も使えます。

「地球」(ちきゅう) は、私たちが住む星の名前です。 名前について(英語)

目次

リファレンス · データの入口(自分で用意した地球の地図や軌道データを、ライセンスと出典つきのソースとして渡し、いま画面にあるのは誰のデータかを示します)

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

引数

名前型説明
basestring

The folder's address, with or without the closing slash.

options (省略可)EarthTilesOptions

The fetch and the decoder to use.

戻り値

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));

ソースを見るGitHub で編集@johnmorrisdotca/chikyu-earth 0.51.1 のソースから作成しました。

この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。