Reference · Framing, geometry and quiz tools
mapOutlinesfunction
The outlines of every region of a map, in the map's order, with a point on each one's land.
Import it
import { mapOutlines } from "@johnmorrisdotca/chizu";
Definition
function mapOutlines(map: Pick<ChizuMap, "regions" | "insets">): MapOutline[]
Parameters
| Name | Type | Description |
|---|---|---|
map | Pick<ChizuMap, "regions" | "insets"> | The native map or map fields required by this signature; coordinates and region codes belong to its canvas. |
Returns
MapOutline[]
The outlines of every region of a map, in the map's order, with a point on each one's land.
Examples
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 trueWhat it prints (run when this page was built)