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

nearbyfunction

A place made less exact: put on a grid about km kilometres across, so a reader's own place can be drawn without saying their street. Use it on what the browser's location gives before it is drawn or kept.

Import it

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

Definition

function nearby(point: GeoPoint, km?: number): GeoPoint

Parameters

NameTypeDescription
pointGeoPoint

Longitude and latitude in degrees.

km (optional)number

The grid's size in kilometres (10).

Returns

GeoPoint

The point on the grid, to four decimals.

Examples

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

console.log(nearby({ lon: -79.38321, lat: 43.65348 }));
{ lon: -79.3423, lat: 43.6579 }

What it prints (run when this page was built)

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