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

TileCameratype

Where the camera is, as the realistic Earth draws it: the place in the middle of the disc, the box in CSS pixels, the pan, and the disc's radius in CSS pixels.

Import it

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

Definition

interface TileCamera {
    lon: number;
    lat: number;
    width: number;
    height: number;
    panX: number;
    panY: number;
    radius: number;
    perspective?: TilePerspective;
}

Members

NameTypeDescription
lonnumber
latnumber
widthnumber
heightnumber
panXnumber
panYnumber
radiusnumber
perspective (optional)TilePerspective | undefined

A camera of the space view, which has a real place and a perspective, in place of the disc: when given, lon, lat, panX, panY are not read and radius is the disc's radius at the nearest ground.

Examples

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

const camera: TileCamera = { lon: 10, lat: 20, width: 800, height: 600, panX: 0, panY: 0, radius: 900 };
console.log(camera.radius);
900

What it prints (run when this page was built)

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