UNPKG

@allmaps/annotation

Version:

Functions for generating and parsing IIIF georeference annotations

17 lines (16 loc) 716 B
import type { Annotation1, AnnotationPage1 } from './types.js'; /** * Generates a Georeference Annotation from a single Georeferenced Map or * an Annotation Page containing multiple Georeference Annotations from an array of Georeferenced Maps. * @param mapOrMaps - Single Georeferenced Map, or an array of Georeferenced Maps * @returns Georeference Annotation or Annotation Page * @example * ```js * import fs from 'fs' * import { generateAnnotation } from '@allmaps/annotation' * * const map = JSON.parse(fs.readFileSync('./examples/map.example.json')) * const annotation = generateAnnotation(map) * ``` */ export declare function generateAnnotation(mapOrMaps: unknown): Annotation1 | AnnotationPage1;