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

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

NameTypeDescription
placeMapPlace

The part of the map, in degrees.

detailnumber

The pixels across the whole circumference wanted.

layer (optional)TileLayer

The levels the source has; DEFAULT_LEVELS where left out.

prefix (optional)string

Put before each key ("day/"), for a folder of several layers.

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)

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