import { type LngLatBoundsLike } from 'maplibre-gl'; import Resource, { type ResourceKind } from './resource'; /** * Where a record is, for when what it holds can't be drawn on a map - it sits behind authentication, * or nothing here can read the format, or it is a scan with no georeferencing to place it by, or the * preview was tried and failed. Knowing roughly what part of the world a thing covers is worth a * great deal on its own, and is most of what a reader wants from a map they can't yet see. * * The one resource that fetches nothing: the shape is handed over at construction rather than read * from a URL, so this draws immediately and can't fail. A geometry is preferred over a bounding box * where a caller has one - a record's `locn_geometry` may describe an archipelago or a coastline, * and squaring that off to its envelope claims coverage it doesn't have. */ export default class LocationResource extends Resource { readonly kind: ResourceKind; private geometry; constructor(id: string, location: GeoJSON.Geometry | LngLatBoundsLike); label(): string; test(): Promise; getGeometry(): GeoJSON.Geometry; }