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

MarkerInputtype

A place on the Earth. Chikyu ships none: the page brings its own.

Import it

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

Definition

interface MarkerInput {
    id: string;
    lon: number;
    lat: number;
    label?: string;
    description?: string;
    color?: string;
    icon?: MarkerIcon;
    size?: number;
    group?: string;
    priority?: number;
    data?: unknown;
}

Members

NameTypeDescription
idstring

Your own unique name for it.

lonnumber

Degrees east and north.

latnumber
label (optional)string | undefined

Shown beside the dot when there is room; also its name for a screen reader.

description (optional)string | undefined

What a screen reader says instead of the label (a sentence).

color (optional)string | undefined

Any CSS colour. Default the accent.

icon (optional)MarkerIcon | undefined
size (optional)number | undefined

Diameter in CSS pixels, 4 to 32. Default 8.

group (optional)string | undefined

A name for a set of markers (cities, stadiums) that can be shown or hidden together.

priority (optional)number | undefined

Higher keeps its label when labels crowd. Default 0.

data (optional)unknown

Yours: given back in every event.

Examples

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

const tokyo: MarkerInput = { id: "tokyo", lon: 139.69, lat: 35.69, label: "Tokyo", group: "Cities", priority: 5, data: { population: 14_000_000 } };
console.log(tokyo.label);
Tokyo

What it prints (run when this page was built)

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