Reference · Markers on the globe
PlaceViewtype
A picture of the Earth for places to be laid on: its box, and a way to find a point of the surface in it (false when the point is behind the camera).
Import it
import type { PlaceView } from "@johnmorrisdotca/chikyu-earth/markers";
Definition
interface PlaceView {
width: number;
height: number;
at(lon: number, lat: number, out: SurfacePoint): boolean;
radius?: number;
}
Members
| Name | Type | Description |
|---|---|---|
width | number | |
height | number | |
at | (lon: number, lat: number, out: SurfacePoint): boolean | |
radius (optional) | number | undefined | The Earth's radius in the picture, in CSS pixels: how close places may be before they are gathered into a group. Left out, none are gathered. |
Examples
import { orthoView, type PlaceView } from "@johnmorrisdotca/chikyu-earth/markers";
const view: PlaceView = orthoView({ lon: 0, lat: 0, radius: 200, cx: 210, cy: 210, width: 420, height: 420 });
console.log(view.width);420What it prints (run when this page was built)