Reference · The globe as an SVG string
ProjectionViewtype
What d3-geo's orthographic projection is given for a view: its rotation, scale and translation.
Import it
import type { ProjectionView } from "@johnmorrisdotca/chikyu-earth";
Definition
interface ProjectionView {
rotation: Rotation;
scale: number;
translate: [
number,
number
];
}
Members
| Name | Type | Description |
|---|---|---|
rotation | Rotation | |
scale | number | |
translate | [number, number] |
Examples
import { projectionView, type ProjectionView } from "@johnmorrisdotca/chikyu-earth";
const view: ProjectionView = projectionView({ lon: 0, lat: 0 }, 400);
console.log(view.scale, view.translate);199 [ 200, 200 ]What it prints (run when this page was built)