Reference · Framing, geometry and quiz tools
CalloutSpottype
One numbered circle placed in open water, and the leader line that joins it to its region.
Import it
import type { CalloutSpot } from "@johnmorrisdotca/chizu";
Definition
type CalloutSpot = {
code: string;
number: number;
start: [
number,
number
];
circle: [
number,
number
];
radius: number;
};
Members
| Name | Type | Description |
|---|---|---|
code | string | The region it names. |
number | number | Its number: where it was in the list asked for, from 1 (or its place from the west, with |
start | [number, number] | Where its leader starts: a point on the region's own land, as drawn. |
circle | [number, number] | The circle's centre. |
radius | number | The circle's radius, in the map's units. |
Examples
import WORLD from "@johnmorrisdotca/chizu/world";
import { layoutCallouts, type CalloutSpot } from "@johnmorrisdotca/chizu";
const [first]: CalloutSpot[] = layoutCallouts(WORLD, { codes: ["JP"] });
console.log(first!.code, first!.number);
// JP 1JP 1What it prints (run when this page was built)