Reference · Markers on the globe
PlaceGrouptype
Places gathered together on the ground: where the group is drawn (the middle of its places, or the place itself when it is alone) and which places of the list are in it.
Import it
import type { PlaceGroup } from "@johnmorrisdotca/chikyu-earth/markers";
Definition
interface PlaceGroup {
lon: number;
lat: number;
members: number[];
}
Members
| Name | Type | Description |
|---|---|---|
lon | number | |
lat | number | |
members | number[] | Indices of its places in the list given, in the list's order. |
Examples
import { groupPlaces, type PlaceGroup } from "@johnmorrisdotca/chikyu-earth/markers";
const groups: PlaceGroup[] = groupPlaces([{ id: "a", lon: 0, lat: 0 }], 8);
console.log(groups[0]?.members);[ 0 ]What it prints (run when this page was built)