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 realistic Earth's pure parts

BorderDatatype

Where the borders' shapes come from. countries gives the countries (chizu's world-geo, Natural Earth 1:110m, when left out); regions gives one country's regions by its code, or null for a country with none, and draws no regions when left out. Each is a set of shapes in longitude and latitude.

Import it

import type { BorderData } from "@johnmorrisdotca/chikyu-earth/realistic";

Definition

interface BorderData {
    countries?: () => Promise<BorderShapes>;
    regions?: (code: string) => Promise<BorderShapes | null>;
}

Members

NameTypeDescription
countries (optional)(() => Promise<BorderShapes>) | undefined
regions (optional)((code: string) => Promise<BorderShapes | null>) | undefined

Examples

import type { BorderData } from "@johnmorrisdotca/chikyu-earth/realistic";

const data: BorderData = { regions: async (code) => (code === "JP" ? (await fetch("/regions/jp.json")).json() : null) };
console.log(typeof data.regions);

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