I am trying to setup image annotation using Annotorious on OpenSeaDragon but I am running into an issue during initialization. According to the API, I should first setup the viewer using,
const viewer = OpenSeadragon({
id: "openseadragon",
tileSources: {
type: "image",
url: "1280px-Hallstatt.jpg"
}
});
var anno = OpenSeadragon.Annotorious(viewer);
but this generates a whole new OpenSeadragon viewer/canvas whereas the page I am working on will already have a viewer setup, so this creates another viewer. Is there a way to get the viewer already in the page and pass to OpenSeadragon.Annotorious()? I am new to JavaScript and web development so this may be a trivial question.