UNPKG

@allmaps/annotation

Version:

Functions for generating and parsing IIIF georeference annotations

17 lines (16 loc) 707 B
import { GeoreferencedMap2 } from './types.js'; /** * Parses a Georeference Annotation or an Annotation Page containing multiple Georeference Annotations * and returns an array of Georeferenced Maps. * @param {Annotation | AnnotationPage} annotation - Georeference Annotation or Annotation Page containing multiple Georeference Annotations * @returns {Map[]} Array of maps * @example * ```js * import fs from 'fs' * import { parseAnnotation } from '@allmaps/annotation' * * const annotation = JSON.parse(fs.readFileSync('./examples/annotation.example.json')) * const maps = parseAnnotation(annotation) * ``` */ export declare function parseAnnotation(annotation: unknown): GeoreferencedMap2[];