Closed darkmich closed 1 year ago
Yikes - sorry, I completely missed this issue. Not sure if it's still relevant half a year later. In any case: yes, the source URL isn't really a defined concept in OpenSeadragon. (It does work with IIIF sources and when using a normal image file.) Nonetheless, the Firebase plugin requires a source
property to be present, so it can query the Firebase DB for the annotations on that particular image.
The only two workarounds would be to patch the url
in the tilehandler, as you did - or hack the Firebase plugin. (I agree that your workaround is the preferable one!)
Steps to replicate: Set up an OpenSeadragon instance using a dynamic tile source, initialize the Annotorious OSD plugin. Try to load the Firebase plugin.
Error: When annotations are saved, they're always saved as the base URL plus "undefined".
This seems to be due to Firebase using the URL from OSDAnnotationLayer.js (lines 66+67):
In our OSD implementation, this.viewer.world.getItemAt(0).source.url is undefined. This can be worked around by setting it prior to calling Firebase - that has to be done in TileDoneHandler to make sure that source is defined, as it's only defined when OSD actually puts something in the canvas:
I suspect this is because our OSD tile source isn't a file - we're loading tiles from S3-storage as we need them.
I suspect OSD isn't setting source.url because there's no one URL for the source - we get the tiles as we go along.