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

Clustertype

Several points gathered into one on the screen: where it is drawn and which points are in it.

Import it

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

Definition

interface Cluster {
    x: number;
    y: number;
    members: number[];
}

Members

NameTypeDescription
xnumber
ynumber
membersnumber[]

Indices of the points in it.

Examples

import { clusterPoints, type Cluster } from "@johnmorrisdotca/chikyu-earth/markers";

const clusters: Cluster[] = clusterPoints([0, 1], 2, [10, 12], [10, 11], 28);
console.log(clusters[0]?.members);
[ 0, 1 ]

What it prints (run when this page was built)

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