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 · The globe as an SVG string

routeLegfunction

Distance, bearings, midpoint and a flight-time estimate between two places. The distance quoted is the WGS84 geodesic. The flight time is that distance at FLIGHT_SPEED_KM_H, an estimate with no wind.

Import it

import { routeLeg } from "@johnmorrisdotca/chikyu-earth";

Definition

function routeLeg(from: GeoPoint, to: GeoPoint): RouteLeg | null

Parameters

NameTypeDescription
fromGeoPoint

The start, degrees.

toGeoPoint

The end, degrees.

Returns

RouteLeg | null

The leg, or null when a place is not on the Earth.

Examples

import { routeLeg } from "@johnmorrisdotca/chikyu-earth";

const leg = routeLeg({ lon: 0, lat: 0 }, { lon: 1, lat: 0 });
console.log(leg?.kilometres.toFixed(3), leg?.initialBearing);
111.319 90

What it prints (run when this page was built)

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