Skip to content

Instantly share code, notes, and snippets.

@edsilv
Created September 15, 2023 09:57
Show Gist options
  • Save edsilv/cfb14846495eceba1bed23ee417fb923 to your computer and use it in GitHub Desktop.
Save edsilv/cfb14846495eceba1bed23ee417fb923 to your computer and use it in GitHub Desktop.
Universal Viewer IIIF Content State Example

Example from IIIF Docs: https://iiif.io/api/content-state/1.0/#51-a-region-of-a-canvas-in-a-manifest

Modified to use Wellcome manifest:

{
  "@context": "http://iiif.io/api/presentation/3/context.json",
  "id": "https://example.org/import/1",
  "type": "Annotation",
  "motivation": ["contentState"],
  "target": {
     "id": "https://iiif.wellcomecollection.org/presentation/b18035723/canvases/b18035723_0003.JP2#xywh=597,707,1512,784",
     "type": "Canvas",
     "partOf": [{
        "id": "https://wellcomelibrary.org/iiif/b18035723/manifest",
        "type": "Manifest"
     }]
   }
}

Encoded using https://base64url.herokuapp.com/, then added as a iiif-content querystring parameter here:

https://www.universalviewer.dev/#?iiif-content=JTdCJTBBJTIwJTIwJTIyJTQwY29udGV4dCUyMiUzQSUyMCUyMmh0dHAlM0ElMkYlMkZpaWlmLmlvJTJGYXBpJTJGcHJlc2VudGF0aW9uJTJGMyUyRmNvbnRleHQuanNvbiUyMiUyQyUwQSUyMCUyMCUyMmlkJTIyJTNBJTIwJTIyaHR0cHMlM0ElMkYlMkZleGFtcGxlLm9yZyUyRmltcG9ydCUyRjElMjIlMkMlMEElMjAlMjAlMjJ0eXBlJTIyJTNBJTIwJTIyQW5ub3RhdGlvbiUyMiUyQyUwQSUyMCUyMCUyMm1vdGl2YXRpb24lMjIlM0ElMjAlNUIlMjJjb250ZW50U3RhdGUlMjIlNUQlMkMlMEElMjAlMjAlMjJ0YXJnZXQlMjIlM0ElMjAlN0IlMEElMjAlMjAlMjAlMjAlMjAlMjJpZCUyMiUzQSUyMCUyMmh0dHBzJTNBJTJGJTJGaWlpZi53ZWxsY29tZWNvbGxlY3Rpb24ub3JnJTJGcHJlc2VudGF0aW9uJTJGYjE4MDM1NzIzJT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