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

greatCircleKmfunction

The great-circle distance, kilometres, on a sphere of MEAN_RADIUS_KM. The same angle trackSteps uses between two unit vectors.

Import it

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

Definition

function greatCircleKm(from: GeoPoint, to: GeoPoint): number | null

Parameters

NameTypeDescription
fromGeoPoint

The start, degrees.

toGeoPoint

The end, degrees.

Returns

number | null

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

Examples

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

console.log(greatCircleKm({ lon: 0, lat: 0 }, { lon: 0, lat: 0 }));
0

What it prints (run when this page was built)

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