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

gridKeyfunction

The key of the tile that holds a point, [<prefix>]level/column/row, or undefined when no tile holds it.

Import it

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

Definition

function gridKey(grid: MapGrid, level: number, lon: number, lat: number, prefix?: string): string | undefined

Parameters

NameTypeDescription
gridMapGrid

The grid.

levelnumber

The level number.

lonnumber

The longitude in degrees.

latnumber

The latitude in degrees.

prefix (optional)string

Put before the key.

Returns

string | undefined

The key, or undefined.

Examples

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

console.log(gridKey(gibsGrid("250m"), 3, 0, 0));
3/5/2

What it prints (run when this page was built)

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