Reference · The place under a point: country, sea, continent and the nearest city
PlaceOptionstype
Options for placeOf and alongTrack. Without cities, nearestCity is null. maxKm defaults to 100 and is at most 20,000.
Import it
import type { PlaceOptions } from "@johnmorrisdotca/chikyu-earth/place";
Definition
interface PlaceOptions {
cities?: PlaceCities;
towns?: (countryCode: string) => readonly HereTown[];
maxKm?: number;
}
Members
| Name | Type | Description |
|---|---|---|
cities (optional) | PlaceCities | undefined | |
towns (optional) | ((countryCode: string) => readonly HereTown[]) | undefined | |
maxKm (optional) | number | undefined |
Examples
import type { PlaceOptions } from "@johnmorrisdotca/chikyu-earth/place";
const options: PlaceOptions = { maxKm: 40 };
console.log(options.maxKm);40What it prints (run when this page was built)