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 data door: hand the package your own maps of the Earth or orbit data as a source with its own licence and credit, and see whose data is on the screen

EarthTilesOptionstype

What earthTiles takes.

Import it

import type { EarthTilesOptions } from "@johnmorrisdotca/chikyu-earth/door";

Definition

interface EarthTilesOptions {
    fetch?: (url: string, init?: RequestInit) => Promise<Response>;
    decode?: (blob: Blob) => Promise<BitmapLike>;
}

Members

NameTypeDescription
fetch (optional)((url: string, init?: RequestInit) => Promise<Response>) | undefined

The fetch to use: the global one where left out. It is called as fetch(address, { mode: "cors", signal }).

decode (optional)((blob: Blob) => Promise<BitmapLike>) | undefined

Makes a picture of a tile's bytes: createImageBitmap where left out.

Examples

import type { EarthTilesOptions } from "@johnmorrisdotca/chikyu-earth/door";

const options: EarthTilesOptions = { fetch: (url, init) => fetch(url, init) };
console.log(typeof options.fetch);
function

What it prints (run when this page was built)

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