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

routeRunsfunction

The runs of a route after it is split at the date line, so a flat map draws two pieces instead of a line across the world. A run that does not cross is one piece. Uses splitDateLine.

Import it

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

Definition

function routeRuns(points: readonly GeoPoint[]): GeoPoint[][]

Parameters

NameTypeDescription
pointsreadonly GeoPoint[]

Points in order along the route, including the ends.

Returns

GeoPoint[][]

One list of points per piece.

Examples

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

console.log(routeRuns([{ lon: 179, lat: 0 }, { lon: -179, lat: 0 }]).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.