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

Placementtype

Where one label goes: which item it is and its box's top-left corner.

Import it

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

Definition

interface Placement {
    item: number;
    left: number;
    top: number;
}

Members

NameTypeDescription
itemnumber

Index into the items given.

leftnumber

The label box's top-left corner.

topnumber

Examples

import { placeLabels, type Placement } from "@johnmorrisdotca/chikyu-earth/markers";

const placed: Placement[] = placeLabels([{ x: 100, y: 100, r: 4, w: 60, h: 20, priority: 1 }], 300, 300, 10);
console.log(placed[0]);
{ item: 0, left: 107, top: 90 }

What it prints (run when this page was built)

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