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

NamedShapetype

One country outline the names are made from: a GeoJSON feature in longitude and latitude (a Polygon or MultiPolygon) with its code and its English and Japanese names, as chizu's world-geo has them. A feature with no name is passed over.

Import it

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

Definition

interface NamedShape {
    properties?: {
        code?: string | null;
        name?: string | null;
        nameJa?: string | null;
    } | null;
    geometry: {
        type: string;
        coordinates: unknown;
    } | null;
}

Members

NameTypeDescription
properties (optional){ code?: string | null; name?: string | null; nameJa?: string | null; } | null | undefined
geometry{ type: string; coordinates: unknown; } | null

Examples

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

const square: NamedShape = { properties: { code: "A", name: "Square", nameJa: "四角" }, geometry: { type: "Polygon", coordinates: [[[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]]] } };
console.log(square.properties?.name);
Square

What it prints (run when this page was built)

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