Reference
The globe as an SVG string
import { … } from "@johnmorrisdotca/chikyu-earth";
Exports
| Name | Kind | What it is |
|---|---|---|
centreRotation | function | The rotation that puts centre in the middle of the disc: d3-geo's rotate is the negative of the point. |
cleanStyle | function | A value from outside (an attribute, a query parameter) as a style's name: the default for anything else. |
COUNTRIES | constant | Every country the globe draws, as GeoJSON in longitude and latitude (177 features, Antarctica included), each with its English name, its Japanese name and its two-letter code. |
countryList | function | Every country the globe draws, with its kuni name and code. |
CountryProps | type | What one country's outline carries: its English and Japanese name and its ISO alpha-2 code, all from kuni. |
DEFAULT_STYLE | constant | The style a drawing is in when none is named. |
DEGREES_PER_MS | constant | How far the Earth turns in one millisecond, in degrees. |
GeoPoint | type | A point on the globe, in degrees: lon from -180 to 180 (east is positive), lat from -90 to 90 (north is positive). |
globe | function | The globe as an SVG string, turned to rotation and drawn in style, size pixels square. |
globeBaseScale | function | The radius of an unzoomed globe in a square of size pixels. |
GlobeOptions | type | What globe() may be asked. |
GlobeView | type | What a shared view controller tells the globe: its turn (yaw, degrees), tip (tilt, degrees), zoom (1 is Fit) and pan (panX and panY, CSS pixels). |
HOME_VIEW | constant | The view when it opens: the home centre, upright, at 1x with no pan. |
projectionView | function | What the projection is given for a view: yaw turns longitude, tilt tips latitude, zoom scales and pan moves the disc in CSS pixels. |
ProjectionView | type | What d3-geo's orthographic projection is given for a view: its rotation, scale and translation. |
Rotation | type | How the globe is turned: [lambda, phi] in degrees, the pair d3-geo's rotate takes. |
rotationAt | function | The rotation at now for a globe that was centred on centre at start. |
SIDEREAL_DAY_MS | constant | One sidereal day — the Earth's turn against the stars, 23 h 56 min 4.0905 s — in milliseconds. |
spinAt | function | How far the Earth has turned after ms milliseconds, in degrees. |
Style | type | The lines and fills of one look: colours and widths only, never the geometry. |
STYLE_NAMES | constant | Every style's name, in the order they are listed. |
StyleName | type | The name of a look: "line" or "thick". |
STYLES | constant | The looks the globe is drawn in, by name: line (thin outlines) and thick. |