PlaceGroup型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
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 type { PlaceGroup } from "@johnmorrisdotca/chikyu-earth/markers";
定義
interface PlaceGroup {
lon: number;
lat: number;
members: number[];
}
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
lon | number | |
lat | number | |
members | number[] | Indices of its places in the list given, in the list's order. |
例
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 ]出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。