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

BorderFeaturetype

One shape a border set is made of: a GeoJSON feature in longitude and latitude (degrees), a Polygon or MultiPolygon, with an optional code in its properties (a country's code, which says which regions to ask for). Any other geometry is passed over.

Import it

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

Definition

interface BorderFeature {
    properties?: {
        code?: string | null;
    } | null;
    geometry: {
        type: string;
        coordinates: unknown;
    } | null;
}

Members

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

Examples

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

const square: BorderFeature = { properties: { code: "A" }, geometry: { type: "Polygon", coordinates: [[[0, 0], [1, 0], [1, 1], [0, 1], [0, 0]]] } };
console.log(square.properties?.code);
A

What it prints (run when this page was built)

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