Skip to the content

Chikyu Earth地球

A line-drawn globe of the world's countries that turns at the Earth's own rate, with an optional realistic Earth from space and markers for any place.

Chikyu is the Japanese word 地球 for the Earth. About the name

Contents

Reference · The data door: hand the package your own maps of the Earth or orbit data as a source with its own licence and credit, and see whose data is on the screen

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

NameTypeDescription
basestring

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

options (optional)EarthTilesOptions

The fetch and the decoder to use.

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

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/chikyu-earth 0.51.1.