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

PlaceViewtype

A picture of the Earth for places to be laid on: its box, and a way to find a point of the surface in it (false when the point is behind the camera).

Import it

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

Definition

interface PlaceView {
    width: number;
    height: number;
    at(lon: number, lat: number, out: SurfacePoint): boolean;
    radius?: number;
}

Members

NameTypeDescription
widthnumber
heightnumber
at(lon: number, lat: number, out: SurfacePoint): boolean
radius (optional)number | undefined

The Earth's radius in the picture, in CSS pixels: how close places may be before they are gathered into a group. Left out, none are gathered.

Examples

import { orthoView, type PlaceView } from "@johnmorrisdotca/chikyu-earth/markers";

const view: PlaceView = orthoView({ lon: 0, lat: 0, radius: 200, cx: 210, cy: 210, width: 420, height: 420 });
console.log(view.width);
420

What it prints (run when this page was built)

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