mapOutlines関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
The outlines of every region of a map, in the map's order, with a point on each one's land.
インポート
import { mapOutlines } from "@johnmorrisdotca/chizu";
定義
function mapOutlines(map: Pick<ChizuMap, "regions" | "insets">): MapOutline[]
引数
| 名前 | 型 | 説明 |
|---|---|---|
map | Pick<ChizuMap, "regions" | "insets"> | The native map or map fields required by this signature; coordinates and region codes belong to its canvas. |
戻り値
MapOutline[]
The outlines of every region of a map, in the map's order, with a point on each one's land.
例
import WORLD from "@johnmorrisdotca/chizu/world";
import { mapOutlines } from "@johnmorrisdotca/chizu";
const outlines = mapOutlines(WORLD);
console.log(outlines.length === WORLD.regions.length, mapOutlines(WORLD) === outlines);
// true truetrue true出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。