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

LabelItemtype

One label to place: its dot's centre and radius, its box's size and its priority.

Import it

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

Definition

interface LabelItem {
    x: number;
    y: number;
    r: number;
    w: number;
    h: number;
    priority: number;
}

Members

NameTypeDescription
xnumber

The dot's centre and radius.

ynumber
rnumber
wnumber

The label's box size.

hnumber
prioritynumber

Higher is placed first.

Examples

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

const label: LabelItem = { x: 100, y: 100, r: 4, w: 60, h: 20, priority: 1 };
console.log(label.w);
60

What it prints (run when this page was built)

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