Skip to content
This repository has been archived by the owner on Mar 1, 2023. It is now read-only.

warped map layer not setting baseUrl on tiles #1

Open
rybesh opened this issue Aug 10, 2021 · 9 comments
Open

warped map layer not setting baseUrl on tiles #1

rybesh opened this issue Aug 10, 2021 · 9 comments

Comments

@rybesh
Copy link

rybesh commented Aug 10, 2021

I know Allmaps is under heavy development, so I apologize if issues are not welcome at this time.

When I try to view the following annotation in the Viewer…
https://annotations.allmaps.org/images/XJfUAcWWXksbXmq1

… I get errors in the console showing that the Viewer is failing to load URLs like:
https://viewer.allmaps.org/undefined/512,512,512,512/512,/0/default.jpg

Digging into the code a bit, I see that the baseUrl for tile is being set from the @id property of the image manifest:
https://github.com/allmaps/layers/blob/master/src/lib/tiles.js#L99

However, my image manifest (being served by Cantaloupe 5.0.3) uses id, not @id:
https://vizhyulizz.aeshin.org/iiif/3/Achaemenid_Empire_500_BC.png/info.json

According to http://iiif.io/api/image/3/context.json they should be equivalent (id is mapped to @id).

Incidentally the Viewer code also seems to be expecting an @id attribute on the annotation (to set the id of the georeferencedMap) but the annotation created in the Editor (linked above) doesn’t have one. But I think that is unrelated to this issue.

Thanks again for your excellent work on this awesome tool. As you can probably tell I am excited to use it!

@rybesh
Copy link
Author

rybesh commented Oct 5, 2021

@bertspaan Hello, just checking in again to see whether it is possible to use Allmaps with Cantaloupe 5. If it’s not possible, that’s fine—I’d just like to know because I am hoping to have some students start on some map annotation work soon, and I’d love to have them use Allmaps if possible. If there is something I can help out with to get this working, I’m happy to.

@bertspaan
Copy link
Member

bertspaan commented Oct 6, 2021

Hi @rybesh! This is a bug in the Allmaps Viewer, and should be very easy to fix. Thanks for opening an issue! (And my apologies, I realize now that you opened the issue 2 months ago...)

I'll look into this later this week. Allmaps should definitely work with Cantaloupe 5!

@bertspaan
Copy link
Member

And you're right: the problem is https://github.com/allmaps/layers/blob/master/src/lib/tiles.js#L99.

I'm working on two JS modules, https://github.com/allmaps/iiif-parser and https://github.com/allmaps/render, I just haven't had the time to fully use them in the Allmaps Viewer. When I do that, everything should work. New version of the code that determines what IIIF tiles are needed for a certain map view: https://github.com/allmaps/render/blob/master/src/tiles.js

@rybesh
Copy link
Author

rybesh commented Oct 6, 2021

Fantastic, thank you!

@bertspaan
Copy link
Member

@rybesh, I'm getting CORS errors when trying to load your info.json from the Viewer. Did you change your server's configuration?

@rybesh
Copy link
Author

rybesh commented Oct 11, 2021

Sorry about that—I'm not sure what happened, but the Cantaloupe server was down and nginx was returning a 502. I've restarted it and CORS seems to be working again now.

@bertspaan
Copy link
Member

Your server did work for a little while, but now I'm getting 502s again...

Your map in the new version of the Viewer:

image

I'm also working on a map tile proxy server for Allmaps, see:

https://observablehq.com/@bertspaan/allmaps-tile-server?url=https://vizhyulizz.aeshin.org/iiif/3/Achaemenid_Empire_500_BC.png

@rybesh
Copy link
Author

rybesh commented Oct 11, 2021

Nice! I'm running this Cantaloupe server on a pretty constrained machine, so it was succumbing to the OOM killer in the middle of the night. I've reduced its max heap size and added a monitoring check, so hopefully it will stay up longer now.

@bertspaan
Copy link
Member

I'll hope to have time to work on updating Viewer with the new modules soon. I'll let you know when, and then I'll close this issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants