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 · The realistic Earth's pure parts

parseManifestfunction

Read a tile set's manifest (manifest.json): the tile size and, for each layer, its levels. A manifest with no usable layer gives undefined.

Import it

import { parseManifest } from "@johnmorrisdotca/chikyu-earth/realistic";

Definition

function parseManifest(json: unknown): { tileSize: number; layers: Record<string, TileLayer>; } | undefined

Parameters

NameTypeDescription
jsonunknown

The parsed JSON.

Returns

{ tileSize: number; layers: Record<string, TileLayer>; } | undefined

A layer name to its levels, and the tile size; or undefined.

Examples

import { parseManifest } from "@johnmorrisdotca/chikyu-earth/realistic";

const manifest = parseManifest({ tileSize: 512, layers: { day: { levels: [{ level: 3, width: 8192, height: 4096, columns: 16, rows: 8 }] } } });
console.log(manifest?.layers["day"]?.levels);
[ { level: 3, width: 8192 } ]

What it prints (run when this page was built)

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