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
| Name | Type | Description |
|---|---|---|
budgetBytes (optional) | number | undefined | The bytes of decoded tiles held, all sources together. Default |
maxInFlight (optional) | number | undefined | The most loads in flight for one source. Default |
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() };