-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #431 from giacomomarchioro/0022-linking-with-a-hot…
…spot Initial commit for 0022
- Loading branch information
Showing
2 changed files
with
164 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
--- | ||
title: Redirecting from one Canvas to another resource (Hotspot linking) | ||
id: 22 | ||
layout: recipe | ||
tags: [annotation] | ||
summary: "Link a portion of a Canvas to another resource. " | ||
viewers: | ||
topic: annotation | ||
code: | ||
--- | ||
|
||
## Use Case | ||
|
||
You want to be able to click on a region of an image and being redirected to another resource. | ||
In an image showing multiple objects or parts, you want to see a detailed version of the content of the annotated part. You have digitized a table of contents and you want the user to be able to click on the area of sections and be redirected to page it is pointing at. | ||
|
||
|
||
## Implementation Notes | ||
|
||
The create the annotation, we create an Annotation inside an AnnotationPage | ||
To select the area we want to link to a specific resource we set the target using the link of the Canvas and a fragment as in [Simple Annotation — Tagging][0021], however, in this case, the `motivation` of the annotation is `linking`. | ||
The `body` contains a SpecificResource with `source` attribute set to the Canvas we want to link. | ||
The `partOf` attribute of the Canvas must point to the Manifest containing the Canvas and have the same `id`. | ||
The element must be present even when the Canvas is part of the same Manifest, in this way when the manifest is consumed it is always possible to identify where the Canvas is contained. | ||
|
||
The implementer could consider adding also a Textual Body to the annotation to give more context to the end-user. | ||
|
||
## Restrictions | ||
|
||
None known. | ||
|
||
## Example | ||
|
||
In this Manifest, we use a photograph of Göttingen from the 2019 IIIF annual conference the annotation is tagging the fountain. In the same Manifest there is a Canvas with a picture of a close up of the fountain. | ||
We link the Annotation of the fountain with the Canvas containing its close up adding a second body to the Annotation. | ||
The body contains a Specific Resource that has the `id` of the Canvas containing the close up of the fountains as `source` and the id of the Manifest in the `partOf` attribute. | ||
|
||
|
||
{% include manifest_links.html viewers="" manifest="manifest.json" %} | ||
|
||
{% include jsonviewer.html src="manifest.json" config='data-line="49-75"' %} | ||
|
||
## Related Recipes | ||
|
||
* [Simple Annotation — Tagging][0021] a simple annotation pointing to a region of an image. | ||
|
||
{% include acronyms.md %} | ||
{% include links.md %} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
{ | ||
"@context": "http://iiif.io/api/presentation/3/context.json", | ||
"id": "{{ id.url }}", | ||
"type": "Manifest", | ||
"label": { | ||
"en": [ | ||
"Picture of Göttingen taken during the 2019 IIIF Conference" | ||
] | ||
}, | ||
"items": [ | ||
{ | ||
"id": "{{ id.path }}/canvas/p1", | ||
"type": "Canvas", | ||
"height": 3024, | ||
"width": 4032, | ||
"items": [ | ||
{ | ||
"id": "{{ id.path }}/page/p1/1", | ||
"type": "AnnotationPage", | ||
"items": [ | ||
{ | ||
"id": "{{ id.path }}/annotation/p0001-image", | ||
"type": "Annotation", | ||
"motivation": "painting", | ||
"body": { | ||
"id": "https://iiif.io/api/image/3.0/example/reference/918ecd18c2592080851777620de9bcb5-gottingen/full/max/0/default.jpg", | ||
"type": "Image", | ||
"format": "image/jpeg", | ||
"height": 3024, | ||
"width": 4032, | ||
"service": [ | ||
{ | ||
"id": "https://iiif.io/api/image/3.0/example/reference/918ecd18c2592080851777620de9bcb5-gottingen", | ||
"type": "ImageService3", | ||
"profile": "level1" | ||
} | ||
] | ||
}, | ||
"target": "{{ id.path }}/canvas/p1" | ||
} | ||
] | ||
} | ||
], | ||
"annotations": [ | ||
{ | ||
"id": "{{ id.path }}/page/p2/1", | ||
"type": "AnnotationPage", | ||
"items": [ | ||
{ | ||
"id": "{{ id.path }}/annotation/p0002-tag", | ||
"type": "Annotation", | ||
"motivation": "linking", | ||
"body": [ | ||
{ | ||
"type": "TextualBody", | ||
"language": "de", | ||
"format": "text/plain", | ||
"value": "Der Gänseliesel-Brunnen" | ||
}, | ||
{ | ||
"type": "SpecificResource", | ||
"source": { | ||
"id": "{{ id.path }}/canvas/p1", | ||
"type": "Canvas", | ||
"partOf": [ | ||
{ | ||
"id": "{{ id.url }}", | ||
"type": "Manifest" | ||
} | ||
] | ||
} | ||
} | ||
], | ||
"target": "{{ id.path }}/canvas/p1#xywh=265,661,1260,1239" | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
"id": "{{ id.path }}/canvas/p2", | ||
"type": "Canvas", | ||
"height": 4032, | ||
"width": 3024, | ||
"items": [ | ||
{ | ||
"id": "{{ id.path }}/page/p2/1", | ||
"type": "AnnotationPage", | ||
"items": [ | ||
{ | ||
"id": "{{ id.path }}/annotation/p0002-image", | ||
"type": "Annotation", | ||
"motivation": "painting", | ||
"body": { | ||
"id": "https://iiif.io/api/image/3.0/example/reference/918ecd18c2592080851777620de9bcb5-fountain/full/max/0/default.jpg", | ||
"type": "Image", | ||
"format": "image/jpeg", | ||
"height": 4032, | ||
"width": 3024, | ||
"service": [ | ||
{ | ||
"id": "https://iiif.io/api/image/3.0/example/reference/918ecd18c2592080851777620de9bcb5-fountain/", | ||
"type": "ImageService3", | ||
"profile": "level1" | ||
} | ||
] | ||
}, | ||
"target": "{{ id.path }}/canvas/p1" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} |