npm.io
0.3.2 • Published 4 years ago

@recogito/annotorious-map-annotation

Licence
BSD-3-Clause
Version
0.3.2
Deps
1
Size
42 kB
Vulns
0
Weekly
0

Annotorious Map Annotation

A helper plugin for using Annotorious with maps and geo-referenced images. After the plugin is installed, annotation shapes will use geographic coordinates (latitude, longitude) rather than image pixel coordinates.

This plugin currently works with Annotorious OpenSeadragon and WMTS maps only.

The plugin depends on:

Installing

npm install @recogito/annotorious-map-annotation

or

<script src="https://cdn.jsdelivr.net/npm/@recogito/annotorious-map-annotation@latest/dist/annotorious-map-annotation.js"></script>

Using

// OpenSeadragon viewer
var viewer = OpenSeadragon({
  id: "openseadragon",
  prefixUrl: "openseadragon/images/"
});

// OpenSeadragon WMTS plugin
var map = await OpenSeadragon.WMTS(viewer, {
  url: 'http://maps.wien.gv.at/wmts/1.0.0/WMTSCapabilities.xml'
});

// Initialize Annotorious
var anno = OpenSeadragon.Annotorious(viewer);

// Add the map annotation plugin
Annotorious.MapAnnotation(anno, map);

Keywords