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

MarkerOptionstype

What attachMarkers may be asked: the most labels, how close markers gather, and the default colour.

Import it

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

Definition

interface MarkerOptions {
    maxLabels?: number;
    clusterRadius?: number;
    color?: string;
}

Members

NameTypeDescription
maxLabels (optional)number | undefined

Most labels shown at once (24).

clusterRadius (optional)number | undefined

Gather markers closer than this many pixels into a cluster (28); 0 turns clustering off.

color (optional)string | undefined

The colour of a marker with none of its own.

Examples

import { attachMarkers, type MarkerOptions, type OverlayElement } from "@johnmorrisdotca/chikyu-earth/markers";

const options: MarkerOptions = { maxLabels: 12, clusterRadius: 20, color: "#ffcc00" };
const mark = (element: OverlayElement) => attachMarkers(element, options);
console.log(typeof mark);
function

What it prints (run when this page was built)

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