Reference · The place under a point: country, sea, continent and the nearest city
PlaceCitytype
The nearest city, from the lists the caller passed. nameJa is the short Japanese name, then the Japanese name, and the English name when neither is known.
bearingDeg is degrees clockwise from north, from the point to the city, or 0 when the city has no coordinates.
Import it
import type { PlaceCity } from "@johnmorrisdotca/chikyu-earth/place";
Definition
interface PlaceCity {
name: string;
nameJa: string;
countryCode: string | null;
distanceKm: number;
bearingDeg: number;
}
Members
| Name | Type | Description |
|---|---|---|
name | string | |
nameJa | string | |
countryCode | string | null | |
distanceKm | number | |
bearingDeg | number |
Examples
import type { PlaceCity } from "@johnmorrisdotca/chikyu-earth/place";
const paris: PlaceCity = { name: "Paris", nameJa: "パリ", countryCode: "FR", distanceKm: 1, bearingDeg: 20 };
console.log(paris.name);ParisWhat it prints (run when this page was built)