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 realistic Earth's pure parts

lookAtfunction

Where the view is centred on the globe: the home centre, turned by yaw (west) and tipped by tilt (south), held to the poles; a drag right is yaw and a drag up is tilt, and the ground follows the pointer.

Import it

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

Definition

function lookAt(centre: GeoPoint, view: GlobeView): GeoPoint

Parameters

NameTypeDescription
centreGeoPoint

The home centre.

viewGlobeView

The turn, tip, zoom and pan from the view controls.

Returns

GeoPoint

The place now in the middle of the disc.

Examples

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

console.log(lookAt({ lon: 10, lat: 80 }, { yaw: 25, tilt: 30, zoom: 1, panX: 0, panY: 0 }));
{ lon: -15, lat: 50 }

What it prints (run when this page was built)

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