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

Placetype

One place for the places attribute or property of <chikyu-space> and <chikyu-earth-realistic>. The package keeps none and stores none: the page hands them over.

Import it

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

Definition

interface Place {
    id: string;
    lon: number;
    lat: number;
    label?: string;
    kind?: PlaceKind;
    color?: string;
}

Members

NameTypeDescription
idstring

Your own unique name for it.

lonnumber

Degrees east and north.

latnumber
label (optional)string | undefined

Shown at the top of the marker when there is room.

kind (optional)PlaceKind | undefined

here or favourite (the default).

color (optional)string | undefined

A CSS colour for this place alone (#e8475f, rgb(...), hsl(...) or a colour's name); left out, the kind's colour.

Examples

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

const places: Place[] = [
  { id: "me", lon: -79.4, lat: 43.7, label: "You are here", kind: "here" },
  { id: "tokyo", lon: 139.69, lat: 35.69, label: "Tokyo", kind: "favourite" },
];
console.log(places.length);
2

What it prints (run when this page was built)

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