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

routePointsfunction

Points along the geodesic from from to to, including both ends. count is how many (2 when they are the same place, 64 when left out). When the geodesic does not converge, the points are the great circle (trackSteps).

Import it

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

Definition

function routePoints(from: GeoPoint, to: GeoPoint, count?: number): GeoPoint[]

Parameters

NameTypeDescription
fromGeoPoint

The start.

toGeoPoint

The end.

count (optional)number

How many points, at least 2.

Returns

GeoPoint[]

The points, or an empty list when a place is not on the Earth.

Examples

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

console.log(routePoints({ lon: 0, lat: 0 }, { lon: 1, lat: 0 }, 3).length);
3

What it prints (run when this page was built)

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