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

TileStoreOptionstype

Options for createTileStore.

Import it

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

Definition

interface TileStoreOptions {
    budgetBytes?: number;
    maxInFlight?: number;
    maxTiles?: number;
    onChange?: () => void;
}

Members

NameTypeDescription
budgetBytes (optional)number | undefined

The bytes of decoded tiles held, all sources together. Default TILE_BUDGET_BYTES.

maxInFlight (optional)number | undefined

The most loads in flight for one source. Default MAX_IN_FLIGHT.

maxTiles (optional)number | undefined

The most tiles held, all sources together, as well as the byte budget. Default: no limit.

onChange (optional)(() => void) | undefined

Called when a tile has arrived, failed or been refused, so the view can redraw.

Examples

import type { TileStoreOptions } from "./data-door.ts";

const options: TileStoreOptions = { budgetBytes: 24 * 1024 * 1024, maxTiles: 256, onChange: () => draw() };

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