LayerStatus
Where a layer is: off, on (tiles), loading, loaded, empty, failed, or
outside its zoom window. Outside it, the status says the normalised level
to zoom to: zoom-in for a query layer too far out to ask for features or
a vector tile layer too far out to show, zoom-out for a vector tile layer
too far in. A tile layer is on until the map reports that it is still
waiting for its first tile (tiles-slow) or that none of its tiles loaded
(tiles-unavailable, which replaces tiles-slow). Either lasts until its
tiles change, it is turned off, or the map reports that a tile loaded
later, when it is on again.
This is a type alias exported by @mapcairn/map, checked against version 0.2.0.
Signature
import type { LayerStatus } from "@mapcairn/map";
type LayerStatus = {
readonly kind: "off";
} | {
readonly kind: "on";
} | {
readonly kind: "tiles-slow";
} | {
readonly kind: "tiles-unavailable";
} | {
readonly kind: "loading";
} | {
readonly kind: "ready";
readonly count: number;
readonly updatedAt: number;
readonly capped?: boolean;
} | ZoomLimit | {
readonly kind: "empty";
readonly updatedAt: number;
} | {
readonly kind: "error";
readonly error: "network" | "invalid";
readonly offline?: true;
};