Reference · The realistic Earth's pure parts
CityNametype
A city to name: where its dot is, the text to write and where the text's box goes (its top left corner and size).
Import it
import type { CityName } from "@johnmorrisdotca/chikyu-earth/realistic";
Definition
interface CityName {
city: NamedCity;
text: string;
x: number;
y: number;
left: number;
top: number;
width: number;
height: number;
}
Members
| Name | Type | Description |
|---|---|---|
city | NamedCity | |
text | string | |
x | number | |
y | number | |
left | number | |
top | number | |
width | number | |
height | number |
Examples
import type { CityName } from "@johnmorrisdotca/chikyu-earth/realistic";
const place = (one: CityName): string => `${one.text} at ${one.left}, ${one.top}`;
console.log(typeof place);functionWhat it prints (run when this page was built)