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 · Markers on the globe

PlaceGrouptype

Places gathered together on the ground: where the group is drawn (the middle of its places, or the place itself when it is alone) and which places of the list are in it.

Import it

import type { PlaceGroup } from "@johnmorrisdotca/chikyu-earth/markers";

Definition

interface PlaceGroup {
    lon: number;
    lat: number;
    members: number[];
}

Members

NameTypeDescription
lonnumber
latnumber
membersnumber[]

Indices of its places in the list given, in the list's order.

Examples

import { groupPlaces, type PlaceGroup } from "@johnmorrisdotca/chikyu-earth/markers";

const groups: PlaceGroup[] = groupPlaces([{ id: "a", lon: 0, lat: 0 }], 8);
console.log(groups[0]?.members);
[ 0 ]

What it prints (run when this page was built)

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