Reference · The globe as an SVG string
GlobeOptionstype
What globe() may be asked.
Import it
import type { GlobeOptions } from "@johnmorrisdotca/chikyu-earth";
Definition
interface GlobeOptions {
size?: number;
rotation?: Rotation;
centre?: GeoPoint;
view?: GlobeView;
style?: StyleName;
graticule?: boolean;
}
Members
| Name | Type | Description |
|---|---|---|
size (optional) | number | undefined | Width and height of the square SVG, in pixels. Default 320. |
rotation (optional) | Rotation | undefined | The turn, as [lambda, phi]. Default [0, 0]: the Greenwich meridian facing you, on the equator. |
centre (optional) | GeoPoint | undefined | A home centre and shared view state. When |
view (optional) | GlobeView | undefined | |
style (optional) | "line" | "thick" | undefined | "line" (the default) or "thick". |
graticule (optional) | boolean | undefined | Draw a light graticule under the countries. Default false. |
Examples
import { globe, type GlobeOptions } from "@johnmorrisdotca/chikyu-earth";
const options: GlobeOptions = { size: 200, style: "thick", graticule: true, centre: { lon: 10, lat: 30 } };
console.log(globe(options).startsWith("<svg"));trueWhat it prints (run when this page was built)