ProjectMirador / mirador

An open-source, web-based 'multi-up' viewer that supports zoom-pan-rotate functionality, ability to display/compare simple images, and images with annotations.
https://projectmirador.org
Apache License 2.0
558 stars 255 forks source link

Configuring Mirador 3 using import to viewer annotations #1733

Open glenrobson opened 5 years ago

glenrobson commented 5 years ago

In the sprint 1 demo, Jack showed how to configure Mirador using the following syntax:

windows: [{
         loadedManifest: 'https://iiif.harvardartmuseums.org/manifests/object/299843',
       },
       {
         loadedManifest: 'https://media.nga.gov/public/manifests/nga_highlights.json',
         thumbnailNavigationDisplayed: false,
       }]

Have you considered using the import to viewer specification to configure the loaded Manifests:

https://preview.iiif.io/api/import-to-viewers/api/import/0.1/

This would mean the above block would look like:

windows: [
  {
      "@context": "http://iiif.io/api/presentation/0/context.json",
      "id": "https://example.org/annotation-server/bookmarks/b1",
      "type": "Annotation",
      "motivation": ["highlighting"],
      "target": {
         "id": "https://iiif.harvardartmuseums.org/manifests/object/299843",
         "type": "Manifest"
      }
  },
  {
      "@context": "http://iiif.io/api/presentation/0/context.json",
      "id": "https://example.org/annotation-server/bookmarks/b2",
      "type": "Annotation",
      "motivation": ["highlighting"],
      "target": {
          "id": "https://media.nga.gov/public/manifests/nga_highlights.json",
          "type": "Manifest"
      },
      "generator": {
          "id": "https://projectmirador.org/v3.0.1",
         "type": "Software",
         "name": "Mirador v3",
         "thumbnailNavigationDisplayed": false
      }
  }
]

Granted it is much more verbose but would allow greater flexibility in configuring the opening view of Mirador including, zooming to a part of a canvas, pre-loading search results and other features discussed in the discovery group. It would also mean you are well on the way to implementing the import to viewer spec which will be useful down the line.

aeschylus commented 5 years ago

We discussed it at some length with @mikeapp during our kick-off week. The conclusion was that the library's API should not directly conform to this spec, but that a translator plugin should be kept at the front of our mind as we develop the developer-facing API. I have added this to our API Requirements master ticket as a checkbox. Just having this fixture (@ggeisler) is itself very helpful. Additional feedback like this that bears on the API would be welcome is the linked ticket as well.

Thanks for following so closely!

glenrobson commented 5 years ago

Great glad this is on your radar.