Skip to main content

BasemapAvailability

What useBasemapAvailability returns.

This is an interface exported by @mapcairn/map, checked against version 0.2.0.

Signature​

import type { BasemapAvailability } from "@mapcairn/map";

interface BasemapAvailability

Properties​

clear​

readonly clear: (id?: string) => void;

Marks one basemap, or every basemap when no id is given, available again.

markUnavailable​

readonly markUnavailable: (id: string) => void;

Marks a basemap unavailable. The mark lapses after UNAVAILABLE_FOR_MS, so a provider that recovers returns without a reload, and marking it again restarts that time.

unavailable​

readonly unavailable: ReadonlySet<string>;

The ids of the basemaps that are not working right now. Held in memory, never stored.

Source: packages/map/src/services/basemapAvailability.tsx:22