Skip to the content

Chikyu Earth地球

A line-drawn globe of the world's countries that turns at the Earth's own rate, with an optional realistic Earth from space and markers for any place.

Chikyu is the Japanese word 地球 for the Earth. About the name

Contents

Reference · Markers on the globe

readHereCityfunction

Read the here-city attribute. Absent, off, or anything that is not a positive number of kilometres: off (false). Present with no value, or on: HERE_CITY_KM. A positive number: that many kilometres, at most HERE_CITY_MAX_KM.

Import it

import { readHereCity } from "@johnmorrisdotca/chikyu-earth/markers";

Definition

function readHereCity(value: string | null | undefined): false | number

Parameters

NameTypeDescription
valuestring | null | undefined

The attribute's text, or null when it is not set.

Returns

number | false

false when the marker keeps the page's label, or the kilometre limit.

Examples

import { HERE_CITY_KM, readHereCity } from "@johnmorrisdotca/chikyu-earth/markers";

console.log(readHereCity(null), readHereCity(""), readHereCity("40"), readHereCity("off"), HERE_CITY_KM);
false 100 40 false 100

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/chikyu-earth 0.51.1.