Reference · Markers on the globe
PlaceLayoutOptionstype
What layoutPlaces may be told: the size of each name as the page draws it (a place with no size gets no name), boxes another layer already uses, and the most names.
Import it
import type { PlaceLayoutOptions } from "@johnmorrisdotca/chikyu-earth/markers";
Definition
interface PlaceLayoutOptions {
size?: (place: Place, index: number) => {
width: number;
height: number;
} | null;
taken?: readonly {
left: number;
top: number;
width: number;
height: number;
}[];
maxLabels?: number;
sun?: GeoPoint | null;
}
Members
| Name | Type | Description |
|---|---|---|
size (optional) | ((place: Place, index: number) => { width: number; height: number; } | null) | undefined | |
taken (optional) | readonly { left: number; top: number; width: number; height: number; }[] | undefined | |
maxLabels (optional) | number | undefined | |
sun (optional) | GeoPoint | null | undefined | Where the Sun is overhead, for each shape's |
Examples
import type { PlaceLayoutOptions } from "@johnmorrisdotca/chikyu-earth/markers";
const options: PlaceLayoutOptions = { size: () => ({ width: 60, height: 18 }), maxLabels: 8 };
console.log(options.maxLabels);8What it prints (run when this page was built)