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
| Name | Type | Description |
|---|---|---|
size | number | 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));209What it prints (run when this page was built)