-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Labels
Description
Hello,
I am developing an angular application that uses openseadragon viewer and I'd like to place some svg overlays on this viewer.
However, I am having trouble getting the svg-overlay package initialized into the openseaviewer.
I've installed both npm packages and am importing them as shown below.
import * as OpenSeadragon from 'openseadragon';
import * as OsdSvgOverlay from 'svg-overlay';
this.openSeadragonViewer = OpenSeadragon({
id: "openSeadragonContainer",
...
});
var overlay = this.openSeadragonViewer.svgOverlay();
After this code executes it throws an error saying that '.svgOverlay is not a function'.
I've also tried declaring them in another way
declare var OsdSvgOverlay: any;
But this throws the same error.
Is there something I am doing wrong here? Or can anyone who succesfully added this in a typescript / angular project share their expertise?
Thanks in advance!