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 place under a point: country, sea, continent and the nearest city

PlaceCitytype

The nearest city, from the lists the caller passed. nameJa is the short Japanese name, then the Japanese name, and the English name when neither is known. bearingDeg is degrees clockwise from north, from the point to the city, or 0 when the city has no coordinates.

Import it

import type { PlaceCity } from "@johnmorrisdotca/chikyu-earth/place";

Definition

interface PlaceCity {
    name: string;
    nameJa: string;
    countryCode: string | null;
    distanceKm: number;
    bearingDeg: number;
}

Members

NameTypeDescription
namestring
nameJastring
countryCodestring | null
distanceKmnumber
bearingDegnumber

Examples

import type { PlaceCity } from "@johnmorrisdotca/chikyu-earth/place";

const paris: PlaceCity = { name: "Paris", nameJa: "パリ", countryCode: "FR", distanceKm: 1, bearingDeg: 20 };
console.log(paris.name);
Paris

What it prints (run when this page was built)

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