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

globeBaseScalefunction

The radius of an unzoomed globe in a square of size pixels.

Import it

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

Definition

function globeBaseScale(size: number): number

Parameters

NameTypeDescription
sizenumber

The width and height of the square, in pixels.

Returns

number

The radius in pixels, one less than half the size so the rim is not cut off.

Examples

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

console.log(globeBaseScale(420));
209

What it prints (run when this page was built)

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