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

gridLevelForfunction

The level of a grid whose width is at least detail pixels across a full turn, or the finest level when none is, or undefined when the grid has no level wider than minWidth.

Import it

import { gridLevelFor } from "@johnmorrisdotca/chikyu-earth/door";

Definition

function gridLevelFor(grid: MapGrid, detail: number, minWidth: number): MapGridLevel | undefined

Parameters

NameTypeDescription
gridMapGrid

The source's grid.

detailnumber

The pixels across a full turn the view wants.

minWidthnumber

Levels no wider than this are left out (the picture already underneath).

Returns

MapGridLevel | undefined

The level, or undefined when nothing in the grid is finer than minWidth.

Examples

import { gibsGrid, gridLevelFor } from "@johnmorrisdotca/chikyu-earth/door";

console.log(gridLevelFor(gibsGrid("250m"), 40000, 32768)?.level);
6

What it prints (run when this page was built)

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