Reference · Markers on the globe
Placetype
One place for the places attribute or property of <chikyu-space> and <chikyu-earth-realistic>. The package keeps none and stores none: the page hands them over.
Import it
import type { Place } from "@johnmorrisdotca/chikyu-earth/markers";
Definition
interface Place {
id: string;
lon: number;
lat: number;
label?: string;
kind?: PlaceKind;
color?: string;
}
Members
| Name | Type | Description |
|---|---|---|
id | string | Your own unique name for it. |
lon | number | Degrees east and north. |
lat | number | |
label (optional) | string | undefined | Shown at the top of the marker when there is room. |
kind (optional) | PlaceKind | undefined |
|
color (optional) | string | undefined | A CSS colour for this place alone ( |
Examples
import type { Place } from "@johnmorrisdotca/chikyu-earth/markers";
const places: Place[] = [
{ id: "me", lon: -79.4, lat: 43.7, label: "You are here", kind: "here" },
{ id: "tokyo", lon: 139.69, lat: 35.69, label: "Tokyo", kind: "favourite" },
];
console.log(places.length);2What it prints (run when this page was built)