@projektemacher/storymapjs 0.10.8 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG +81 -0
- package/README.md +129 -12
- package/dist/assets/{demo-DBpeF31K.js → demo-bWnOyfUw.js} +1 -1
- package/dist/assets/harness-C3JUv5Ii.js +1 -0
- package/dist/assets/{harness-multi-CYHgI0a9.js → harness-multi-XZNex3tb.js} +1 -1
- package/dist/assets/{harness-support-Do7sIp2j.js → harness-support-CjfZIVeb.js} +1 -1
- package/dist/assets/main-DQ32hWBM.js +17 -0
- package/dist/context.json +13 -2
- package/dist/css/storymap.css +1 -1
- package/dist/demo.html +3 -2
- package/dist/docs/api/assets/navigation.js +1 -1
- package/dist/docs/api/assets/search.js +1 -1
- package/dist/docs/api/classes/StoryMap.html +777 -269
- package/dist/docs/api/functions/MediaType.html +1 -1
- package/dist/docs/api/functions/isPresentation3Collection.html +1 -1
- package/dist/docs/api/functions/isPresentation3Manifest.html +1 -1
- package/dist/docs/api/functions/isSlideshowCollection.html +51 -0
- package/dist/docs/api/functions/loadCSS.html +1 -1
- package/dist/docs/api/functions/manifestToStorymapData.html +1 -1
- package/dist/docs/api/functions/setLanguage.html +1 -1
- package/dist/docs/api/functions/slideshowToStorymapData.html +51 -0
- package/dist/docs/api/functions/slideshowVersion.html +48 -0
- package/dist/docs/api/functions/storymapToManifest.html +1 -1
- package/dist/docs/api/functions/validateStorymap.html +1 -1
- package/dist/docs/api/functions/validateStorymapAndReport.html +1 -1
- package/dist/docs/api/index.html +115 -12
- package/dist/docs/api/interfaces/AnimationHandle.html +2 -2
- package/dist/docs/api/interfaces/ImagereadyPayload.html +4 -4
- package/dist/docs/api/interfaces/LanguageEntry.html +6 -6
- package/dist/docs/api/interfaces/LatLngLiteral.html +4 -4
- package/dist/docs/api/interfaces/LoadOptions.html +2 -2
- package/dist/docs/api/interfaces/MapEvents.html +116 -0
- package/dist/docs/api/interfaces/MapMarkerEvents.html +66 -0
- package/dist/docs/api/interfaces/MarkerEventPayload.html +57 -0
- package/dist/docs/api/interfaces/MediaEvents.html +78 -0
- package/dist/docs/api/interfaces/MenuBarEvents.html +114 -0
- package/dist/docs/api/interfaces/MessageEvents.html +72 -0
- package/dist/docs/api/interfaces/OlLayer.html +1 -1
- package/dist/docs/api/interfaces/OlMap.html +1 -1
- package/dist/docs/api/interfaces/OlSource.html +1 -1
- package/dist/docs/api/interfaces/OlTileLayer.html +1 -1
- package/dist/docs/api/interfaces/OlVectorLayer.html +1 -1
- package/dist/docs/api/interfaces/OlView.html +1 -1
- package/dist/docs/api/interfaces/SlideBackgroundState.html +66 -0
- package/dist/docs/api/interfaces/SlideEvents.html +78 -0
- package/dist/docs/api/interfaces/SlideNavEvents.html +72 -0
- package/dist/docs/api/interfaces/SlideshowPlayerSettings.html +182 -0
- package/dist/docs/api/interfaces/SlideshowToStorymapResult.html +60 -0
- package/dist/docs/api/interfaces/SlideshowTranslatorOptions.html +65 -0
- package/dist/docs/api/interfaces/SlideshowWarning.html +72 -0
- package/dist/docs/api/interfaces/StoryMapEvents.html +146 -0
- package/dist/docs/api/interfaces/StoryMapMarker.html +763 -0
- package/dist/docs/api/interfaces/StorySliderEvents.html +102 -0
- package/dist/docs/api/interfaces/StorymapBasemap.html +69 -0
- package/dist/docs/api/interfaces/StorymapData.html +12 -6
- package/dist/docs/api/interfaces/StorymapDataWrapper.html +2 -2
- package/dist/docs/api/interfaces/StorymapDocument.html +2 -2
- package/dist/docs/api/interfaces/StorymapError.html +3 -3
- package/dist/docs/api/interfaces/StorymapGeoreference.html +5 -5
- package/dist/docs/api/interfaces/StorymapGeoreferenceBody.html +4 -4
- package/dist/docs/api/interfaces/StorymapGroundControlPoint.html +4 -4
- package/dist/docs/api/interfaces/StorymapLanguageMap.html +2 -2
- package/dist/docs/api/interfaces/StorymapManifest.html +12 -12
- package/dist/docs/api/interfaces/StorymapManifestAnnotation.html +43 -11
- package/dist/docs/api/interfaces/StorymapManifestBackground.html +6 -6
- package/dist/docs/api/interfaces/StorymapManifestCanvas.html +65 -17
- package/dist/docs/api/interfaces/StorymapManifestContentResource.html +8 -8
- package/dist/docs/api/interfaces/StorymapManifestFeatureCollection.html +4 -4
- package/dist/docs/api/interfaces/StorymapManifestGeoreferencing.html +7 -7
- package/dist/docs/api/interfaces/StorymapManifestImageService.html +4 -4
- package/dist/docs/api/interfaces/StorymapManifestRange.html +5 -5
- package/dist/docs/api/interfaces/StorymapManifestService.html +4 -4
- package/dist/docs/api/interfaces/StorymapManifestSpecificResource.html +4 -4
- package/dist/docs/api/interfaces/StorymapManifestStatement.html +3 -3
- package/dist/docs/api/interfaces/StorymapMapOptions.html +5 -5
- package/dist/docs/api/interfaces/StorymapOptions.html +277 -75
- package/dist/docs/api/interfaces/StorymapOverlayLayer.html +42 -11
- package/dist/docs/api/interfaces/StorymapSlide.html +70 -16
- package/dist/docs/api/interfaces/StorymapSlideBackground.html +4 -4
- package/dist/docs/api/interfaces/StorymapSlideLocation.html +58 -14
- package/dist/docs/api/interfaces/StorymapSlideMarker.html +8 -9
- package/dist/docs/api/interfaces/StorymapSlideMedia.html +49 -10
- package/dist/docs/api/interfaces/StorymapSlideNarration.html +61 -9
- package/dist/docs/api/interfaces/StorymapSlideText.html +4 -4
- package/dist/docs/api/interfaces/StorymapTilejson.html +8 -8
- package/dist/docs/api/interfaces/SwipableEvents.html +102 -0
- package/dist/docs/api/interfaces/TextEvents.html +66 -0
- package/dist/docs/api/media/events.md +66 -0
- package/dist/docs/api/media/migration-from-knightlab.md +89 -49
- package/dist/docs/api/media/slideshow.md +109 -0
- package/dist/docs/api/media/storymap-as-iiif-manifest.md +1007 -0
- package/dist/docs/api/modules.html +6 -6
- package/dist/docs/api/types/ContentState.html +3 -3
- package/dist/docs/api/types/FiredEvent.html +43 -0
- package/dist/docs/api/types/ImagereadyKind.html +1 -1
- package/dist/docs/api/types/MediaTypeMatch.html +5 -5
- package/dist/docs/api/types/SwipeDirection.html +36 -0
- package/dist/docs/api/types/TileSourceFactory.html +1 -1
- package/dist/docs/authoring.html +20 -7
- package/dist/docs/events.html +263 -0
- package/dist/docs/iiif.html +136 -22
- package/dist/docs/migration.html +66 -19
- package/dist/docs/readme.html +113 -12
- package/dist/embed/index.html +7 -0
- package/dist/examples/font-css-false.json +33 -0
- package/dist/examples/issue-image-region.json +1 -1
- package/dist/examples/layers-control.json +60 -0
- package/dist/examples/map-template-provider.json +36 -0
- package/dist/examples/multi-media.json +71 -0
- package/dist/examples-iiif/annotated-image.json +16 -0
- package/dist/examples-iiif/font-css-false.json +114 -0
- package/dist/examples-iiif/issue-image-region.json +1 -1
- package/dist/examples-iiif/layers-control.json +226 -0
- package/dist/examples-iiif/map-template-provider.json +133 -0
- package/dist/examples-iiif/multi-media.json +237 -0
- package/dist/examples-slideshow/single.json +79 -0
- package/dist/examples-slideshow/static/pixel.png +0 -0
- package/dist/examples-slideshow/static.json +44 -0
- package/dist/harness-multi.html +3 -3
- package/dist/harness.html +4 -3
- package/dist/index.html +3 -2
- package/dist/js/storymap.d.ts +1326 -289
- package/dist/js/storymap.js +6690 -4784
- package/dist/js/storymap.js.map +1 -1
- package/dist/navplace-properties.json +14 -0
- package/dist/site.css +54 -36
- package/docs/migration-from-knightlab.md +89 -49
- package/docs/storymap-as-iiif-manifest.md +199 -126
- package/package.json +4 -2
- package/schema/storymap.schema.json +334 -34
- package/src/core/Util.ts +3 -1
- package/src/core/mixins.ts +42 -28
- package/src/language/Language.ts +7 -0
- package/src/language/locale/.expected-gaps.json +287 -27
- package/src/language/locale/de.json +11 -1
- package/src/language/locale/en.json +11 -1
- package/src/main.ts +51 -0
- package/src/map/Map.ts +44 -6
- package/src/map/MapMarker.ts +16 -3
- package/src/map/openlayers/Map.OpenLayers.ts +787 -62
- package/src/map/openlayers/MapMarker.OpenLayers.ts +113 -13
- package/src/map/slideView.ts +149 -0
- package/src/map/types.ts +2 -0
- package/src/media/EmbedUtil.ts +27 -2
- package/src/media/Media.ts +27 -4
- package/src/media/embedId.ts +6 -0
- package/src/media/types/Flickr.ts +14 -3
- package/src/media/types/HtmlMedia.ts +66 -0
- package/src/media/types/Image.ts +15 -3
- package/src/media/types/SoundCloud.ts +1 -1
- package/src/media/types/Text.ts +27 -8
- package/src/media/types/Twitter.ts +9 -7
- package/src/media/types/Vimeo.ts +1 -1
- package/src/media/types/YouTube.ts +2 -2
- package/src/scss/Typography.scss +15 -15
- package/src/scss/VCO.StoryMap.scss +173 -8
- package/src/scss/core/Reset.scss +5 -18
- package/src/scss/map/VCO.Map.scss +1 -1
- package/src/scss/map/VCO.MapMarker.scss +20 -9
- package/src/scss/map/openlayers/VCO.Map.OpenLayers.scss +7 -4
- package/src/scss/media/VCO.Media.scss +7 -7
- package/src/scss/media/types/VCO.Media.Blockquote.scss +1 -1
- package/src/scss/media/types/VCO.Media.Text.scss +5 -5
- package/src/scss/media/types/VCO.Media.Twitter.scss +4 -4
- package/src/scss/media/types/VCO.Media.Wikipedia.scss +2 -19
- package/src/scss/site/site.scss +55 -36
- package/src/scss/slider/VCO.Slide.scss +49 -11
- package/src/scss/slider/VCO.SlideNav.scss +23 -7
- package/src/scss/slider/VCO.StorySlider.scss +50 -0
- package/src/scss/snapmap/VCO.SnapMap.scss +3 -3
- package/src/scss/ui/VCO.Consent.scss +20 -14
- package/src/scss/ui/VCO.Layers.scss +119 -0
- package/src/scss/ui/VCO.MenuBar.Button.scss +140 -19
- package/src/scss/ui/VCO.MenuBar.scss +9 -2
- package/src/scss/ui/VCO.Message.scss +14 -0
- package/src/slider/Slide.ts +232 -74
- package/src/slider/SlideNav.ts +15 -4
- package/src/slider/StorySlider.ts +203 -22
- package/src/storymap/Consent.ts +22 -0
- package/src/storymap/StoryMap.ts +944 -131
- package/src/storymap/content-state.ts +3 -8
- package/src/storymap/font-css.ts +72 -0
- package/src/storymap/from-slideshow.ts +785 -0
- package/src/storymap/iiif-shared.ts +228 -0
- package/src/storymap/iiif.ts +289 -100
- package/src/storymap/to-iiif.ts +131 -44
- package/src/types.ts +382 -17
- package/src/ui/LayersControl.ts +302 -0
- package/src/ui/MenuBar.ts +232 -21
- package/src/ui/Message.ts +36 -3
- package/src/ui/Swipable.ts +25 -7
- package/dist/assets/harness-Cr0rYpvt.js +0 -1
- package/dist/assets/main-DXalctuR.js +0 -17
- package/src/scss/VCO.StoryMap.Dark.scss +0 -150
- package/src/scss/Variables.Dark.scss +0 -57
|
@@ -72,15 +72,16 @@ element, ... }` to configure the underlying OpenLayers map; `element`
|
|
|
72
72
|
|
|
73
73
|
## Changed options and map types
|
|
74
74
|
|
|
75
|
-
| Old | New
|
|
76
|
-
| --------------------------------------------- |
|
|
77
|
-
| `map_type: "zoomify"` (+ `options.zoomify`) | preferred: `map_type: "iiif"` with `options.iiif = { url, attribution }` (IIIF Image API 2/3); zoomify still works as a legacy image-pyramid basemap (see below)
|
|
78
|
-
| `map_type: "stamen:toner"` etc. | `"stamen:*"` types are deprecated and remapped: `stamen:watercolor` → `ch-watercolor`, others → `osm:standard`
|
|
79
|
-
| Stadia Maps paid tiles via `map_access_token` | Recommended: free OpenStreetMap vector styles, e.g. `map_type: "osm:bright"` (OpenFreeMap), or any style JSON URL
|
|
80
|
-
| Bundled `map_access_token` | removed — pass `map_access_token` in the options if you use Mapbox/Stadia tiles
|
|
81
|
-
| Bundled Flickr API key | removed — pass `api_key_flickr` in the options if you use `flickr.com/photos` API URLs
|
|
82
|
-
| `relative_date: true` (moment.js) | removed — format dates in the story text
|
|
83
|
-
| `font_css: "stock:<name>"` (or a path) | paths now resolve against the page URL (not the library location), plus the font files ship via `@fontsource-utils/scss`; no separate font CSS link needed
|
|
75
|
+
| Old | New |
|
|
76
|
+
| --------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
77
|
+
| `map_type: "zoomify"` (+ `options.zoomify`) | preferred: `map_type: "iiif"` with `options.iiif = { url, attribution }` (IIIF Image API 2/3); zoomify still works as a legacy image-pyramid basemap (see below) |
|
|
78
|
+
| `map_type: "stamen:toner"` etc. | `"stamen:*"` types are deprecated and remapped: `stamen:watercolor` → `ch-watercolor`, others → `osm:standard` |
|
|
79
|
+
| Stadia Maps paid tiles via `map_access_token` | Recommended: free OpenStreetMap vector styles, e.g. `map_type: "osm:bright"` (OpenFreeMap), or any style JSON URL |
|
|
80
|
+
| Bundled `map_access_token` | removed — pass `map_access_token` in the options if you use Mapbox/Stadia tiles |
|
|
81
|
+
| Bundled Flickr API key | removed — pass `api_key_flickr` in the options if you use `flickr.com/photos` API URLs |
|
|
82
|
+
| `relative_date: true` (moment.js) | removed — format dates in the story text |
|
|
83
|
+
| `font_css: "stock:<name>"` (or a path) | paths now resolve against the page URL (not the library location), plus the font files ship via `@fontsource-utils/scss`; no separate font CSS link needed |
|
|
84
|
+
| `font_css: false` (bundler consumers) | `stock:<name>` resolves via `import.meta.url`, which only survives when this package is _not_ processed by a bundler — bundling inlines `dist/js/storymap.js` into a chunk and the theme URL breaks. Instead `import "@projektemacher/storymapjs/css/fonts/font.default.css"` (fingerprinted, `files/` rebased by the bundler) and pass `font_css: false` for no injected `<link>`. `"none"` works too for JSON. A failing theme only warns |
|
|
84
85
|
|
|
85
86
|
## A story with no map
|
|
86
87
|
|
|
@@ -122,11 +123,12 @@ their neutral values, and the map setters are no-ops.
|
|
|
122
123
|
| Twitter `@nickname` rendering | tweets from `x.com` URLs are now parsed too (fixes `@undefined` nicknames); no migration needed |
|
|
123
124
|
| Ricoh360/theta360 embeds (#391) | service no longer available (won't fix) — paste the provider's `<iframe>` snippet into the slide text if the service returns |
|
|
124
125
|
|
|
125
|
-
Extra media per slide (#358, partial):
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
126
|
+
Extra media per slide (#358, partial): a slide takes `media_extra` (a list of
|
|
127
|
+
further media items, rendered after the primary one) plus `media_layout`
|
|
128
|
+
(`stack`, the default, or `row` for two side-by-side items). An `<iframe>`
|
|
129
|
+
embed snippet pasted into the slide `text` field still renders sanitized
|
|
130
|
+
(scripts, event handlers and non-https sources dropped) — keep that as the
|
|
131
|
+
migration path for removed media types:
|
|
130
132
|
|
|
131
133
|
```html
|
|
132
134
|
<p>Extra footage:</p>
|
|
@@ -157,9 +159,10 @@ storymap JSON sources.
|
|
|
157
159
|
before; the mini map is an OpenLayers `OverviewMap` control.
|
|
158
160
|
- New basemap options: vector styles via `map_type: "osm:<style>"` (OpenFreeMap)
|
|
159
161
|
or a Mapbox style JSON URL.
|
|
160
|
-
-
|
|
161
|
-
|
|
162
|
-
`ol` directly
|
|
162
|
+
- The `Ol*` aliases re-exported from `src/main.ts` (`OlMap`, `OlView`,
|
|
163
|
+
`OlLayer`, `OlTileLayer`, `OlVectorLayer`, `OlSource`, `OlProjection`) let
|
|
164
|
+
a consumer type the map and layers without depending on `ol` directly;
|
|
165
|
+
anything beyond those (features, geometries, coordinates) still needs `ol`.
|
|
163
166
|
|
|
164
167
|
### Direct Leaflet calls → OpenLayers
|
|
165
168
|
|
|
@@ -201,16 +204,18 @@ names and behaviour (`storymap._map.<method>()`, `marker.<method>()`); the OL
|
|
|
201
204
|
engine implements them as thin wrappers over `storymap.map`. Two methods are
|
|
202
205
|
deprecated no-ops and one is gone:
|
|
203
206
|
|
|
204
|
-
| Original method | Status
|
|
205
|
-
| --------------------------------------------------------------------------------------------------------- |
|
|
206
|
-
| `updateDisplay`, `goTo`, `panTo`, `zoomTo`, `viewTo` | unchanged
|
|
207
|
-
| `getBoundsZoom`, `markerOverview`, `calculateMarkerZooms` | unchanged (`getBoundsZoom()` now returns `number \| undefined` instead of a falsy value)
|
|
208
|
-
| `createMiniMap`, `createMarkers`, `createMarker` | unchanged
|
|
209
|
-
| `setMapOffset`, `calculateMinMaxZoom`, `updateMinMaxZoom`, `initialMapLocation` | unchanged
|
|
210
|
-
| `show()` / `hide()` (map and marker) | **deprecated no-ops** — they were already empty in the original viewer. Style `.vco-mapmarker` or use `marker.active(false)`
|
|
211
|
-
| `map.addTo(container)` / `map.removeFrom(container)` | unchanged — inherited from the `DomMixed` mixin: append/remove the map container and fire `added`/`removed`. The engine override re-targets and re-measures the OpenLayers viewport, so a move into a differently sized parent works
|
|
212
|
-
| `marker.createPopup()` | **deprecated no-op** — it never did anything upstream either (empty base body, commented-out Leaflet body), so the `map_popup` option that called it had no effect. Still accepted, still inert
|
|
213
|
-
| `marker.addTo()`, `marker.removeFrom()`, `marker.updateDisplay()`, `marker.active()`, `marker.location()` | unchanged
|
|
207
|
+
| Original method | Status |
|
|
208
|
+
| --------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
209
|
+
| `updateDisplay`, `goTo`, `panTo`, `zoomTo`, `viewTo` | unchanged |
|
|
210
|
+
| `getBoundsZoom`, `markerOverview`, `calculateMarkerZooms` | unchanged (`getBoundsZoom()` now returns `number \| undefined` instead of a falsy value) |
|
|
211
|
+
| `createMiniMap`, `createMarkers`, `createMarker` | unchanged |
|
|
212
|
+
| `setMapOffset`, `calculateMinMaxZoom`, `updateMinMaxZoom`, `initialMapLocation` | unchanged |
|
|
213
|
+
| `show()` / `hide()` (map and marker) | **deprecated no-ops** — they were already empty in the original viewer. Style `.vco-mapmarker` or use `marker.active(false)` |
|
|
214
|
+
| `map.addTo(container)` / `map.removeFrom(container)` | unchanged — inherited from the `DomMixed` mixin: append/remove the map container and fire `added`/`removed`. The engine override re-targets and re-measures the OpenLayers viewport, so a move into a differently sized parent works |
|
|
215
|
+
| `marker.createPopup()` | **deprecated no-op** — it never did anything upstream either (empty base body, commented-out Leaflet body), so the `map_popup` option that called it had no effect. Still accepted, still inert. Use `marker.openPopup()` / `storymap.openMarkerPopup(n)` instead |
|
|
216
|
+
| `marker.addTo()`, `marker.removeFrom()`, `marker.updateDisplay()`, `marker.active()`, `marker.location()` | unchanged |
|
|
217
|
+
| `marker.openPopup()` / `closePopup()` / `togglePopup()` / `isPopupEnabled()` / `popupOpen` | **new** — programmatic control of the popup card (`marker: { popup: true }`); `openPopup()` returns false when disabled or not a real marker, `popupOpen` reports the state |
|
|
218
|
+
| `storymap.openMarkerPopup(n)` / `closeMarkerPopup(n?)` / `isPopupOpen(n)` | **new** — open/close/query a stop's card from the viewer; `openMarkerPopup` navigates to `n` first and returns false (changing nothing) when disabled, out of range, disposed or mapless |
|
|
214
219
|
|
|
215
220
|
Marker helpers that Leaflet provided on the marker object (`getLatLng`,
|
|
216
221
|
`setIcon`, `bindPopup`) are gone; use `marker.latLon()`, the
|
|
@@ -223,17 +228,17 @@ construction, so check it before first use in an async setup). Everything the
|
|
|
223
228
|
viewer keeps internally is available through accessors on `storymap` (and on
|
|
224
229
|
`storymap._map` for the engine methods):
|
|
225
230
|
|
|
226
|
-
| Accessor | Returns
|
|
227
|
-
| ------------------------------------------------------------ |
|
|
228
|
-
| `getBaseLayer()` | the base tile/vector layer
|
|
229
|
-
| `getOverlayLayers()` / `getOverlayLayer(i)` | overlay layers / one by index (`null` if out of range)
|
|
230
|
-
| `getOverlayCount()` | number of overlays
|
|
231
|
-
| `setOverlayVisible(i, on)` / `setOverlayOpacity(i, opacity)` | show/hide and fade one overlay
|
|
232
|
-
| `getMinimap()` | the `OverviewMap` control
|
|
233
|
-
| `getLine()` / `getLineActive()` | the full and the travelled route `VectorLayer`
|
|
234
|
-
| `getMarker(n)` / `getMarkers()` | one marker or all of them, in slide order
|
|
235
|
-
| `setExtraAttributions(html)` | extra attribution HTML, listed after the source credits
|
|
236
|
-
| `isImageSpace()` | whether the map is a IIIF image in image space (see below)
|
|
231
|
+
| Accessor | Returns |
|
|
232
|
+
| ------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------- |
|
|
233
|
+
| `getBaseLayer()` | the base tile/vector layer |
|
|
234
|
+
| `getOverlayLayers()` / `getOverlayLayer(i)` | overlay layers / one by index (`null` if out of range) |
|
|
235
|
+
| `getOverlayCount()` | number of overlays |
|
|
236
|
+
| `setOverlayVisible(i, on)` / `setOverlayOpacity(i, opacity)` | show/hide and fade one overlay |
|
|
237
|
+
| `getMinimap()` | the inner overview `ol/Map` (`OlMap \| null`), not the `OverviewMap` control itself — there is no accessor for the control object |
|
|
238
|
+
| `getLine()` / `getLineActive()` | the full and the travelled route `VectorLayer` |
|
|
239
|
+
| `getMarker(n)` / `getMarkers()` | one marker or all of them, in slide order |
|
|
240
|
+
| `setExtraAttributions(html)` | extra attribution HTML, listed after the source credits |
|
|
241
|
+
| `isImageSpace()` | whether the map is a IIIF image in image space (see below) |
|
|
237
242
|
|
|
238
243
|
`tile_source_factory` may return a full `ol/layer/Layer` (not just a source)
|
|
239
244
|
anywhere a layer is built, so custom layers can carry their own opacity,
|
|
@@ -248,6 +253,22 @@ custom layer with no explicit z-index lands wherever OpenLayers puts it,
|
|
|
248
253
|
which is above the lines — set one explicitly if the layer must sit inside
|
|
249
254
|
the stack.
|
|
250
255
|
|
|
256
|
+
### Layer switcher
|
|
257
|
+
|
|
258
|
+
`show_layers_control: true` adds a disclosure button to the menubar with
|
|
259
|
+
basemap radios and overlay checkboxes. Basemap candidates come from
|
|
260
|
+
`basemaps[]` (entry 0 is the initial basemap unless `map_type` says
|
|
261
|
+
otherwise; omit for an overlays-only control); overlay rows come from the
|
|
262
|
+
built `overlays[]` entries, so a malformed entry never gets a row and row
|
|
263
|
+
_i_ is always layer _i_. `label` may be a function for host i18n (re-invoked
|
|
264
|
+
on `refreshLabels()`), `locked: true` renders a row checked and disabled,
|
|
265
|
+
`control: false` hides a row without removing the overlay — but function
|
|
266
|
+
labels survive only in constructor options, because `mergeData()` lets
|
|
267
|
+
storymap JSON overwrite same-named option keys. A runtime basemap swap
|
|
268
|
+
rebuilds layers but never the view, so candidates needing another
|
|
269
|
+
projection are refused with a warning; switching fires `basemapchange` /
|
|
270
|
+
`overlaychange`, and the visitor's choice is never persisted.
|
|
271
|
+
|
|
251
272
|
### Image space vs. georeferenced
|
|
252
273
|
|
|
253
274
|
`map_type: "iiif"` is a mercator map by default. With `map_as_image: true` the
|
|
@@ -297,8 +318,9 @@ viewer's own pan/zoom set, `view` merges over the computed default).
|
|
|
297
318
|
For source classes the templates cannot express (WMS, authenticated or
|
|
298
319
|
gridded sources), use the `tile_source_factory` option. It is consulted
|
|
299
320
|
for every base, overlay and minimap layer before the built-in
|
|
300
|
-
`map_type` handling — return
|
|
301
|
-
is wrapped in
|
|
321
|
+
`map_type` handling — return any `ol/layer/Layer` (used as-is) or a bare
|
|
322
|
+
`Source` (which is wrapped in a `TileLayer`), or `null`/`undefined` to fall
|
|
323
|
+
through:
|
|
302
324
|
|
|
303
325
|
```js
|
|
304
326
|
import TileLayer from "ol/layer/Tile";
|
|
@@ -306,7 +328,7 @@ import TileWMS from "ol/source/TileWMS";
|
|
|
306
328
|
|
|
307
329
|
new StoryMap("embed", data, {
|
|
308
330
|
map_type: "wms:flood",
|
|
309
|
-
tile_source_factory: (map_type, { createDefault }) =>
|
|
331
|
+
tile_source_factory: (map_type, { options, createDefault }) =>
|
|
310
332
|
map_type.startsWith("wms:")
|
|
311
333
|
? new TileLayer({
|
|
312
334
|
source: new TileWMS({
|
|
@@ -319,6 +341,12 @@ new StoryMap("embed", data, {
|
|
|
319
341
|
});
|
|
320
342
|
```
|
|
321
343
|
|
|
344
|
+
The second factory argument also carries the resolved `options`
|
|
345
|
+
(`{ options, createDefault }`). A factory may return any `ol/layer/Layer`
|
|
346
|
+
(used as-is — including sourceless layers such as Allmaps'
|
|
347
|
+
`WarpedMapLayer`), a bare `Source` (wrapped in a `TileLayer`), or
|
|
348
|
+
`null`/`undefined` to fall through to the default `map_type` handling.
|
|
349
|
+
|
|
322
350
|
Custom sources must carry their own attributions (via the returned
|
|
323
351
|
source or the `attribution` option) — only the built-in `osm*` types
|
|
324
352
|
are credited automatically. `tile_source_factory` is constructor- and
|
|
@@ -342,14 +370,26 @@ factory.
|
|
|
342
370
|
[docs/storymap-as-iiif-manifest.md](storymap-as-iiif-manifest.md#geo-referenced-layers).
|
|
343
371
|
- The editor, staging/backend infrastructure, AWS/GitHub hosting scripts and the
|
|
344
372
|
Python authoring server are gone — this is a viewer-only library.
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
`
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
373
|
+
- **Slideshow tours** are a third input format: W3C `AnnotationCollection`
|
|
374
|
+
documents (the format of slideshow-style guided image tours) load
|
|
375
|
+
directly by object, file or URL, auto-detected after the IIIF branch
|
|
376
|
+
(`slideshow: false` opts out). A pure translator converts them to
|
|
377
|
+
storymap data — per-slide image regions, rotation, filter grading,
|
|
378
|
+
spotlight masks, per-slide basemaps, narration with playback flags and
|
|
379
|
+
player chrome — which renders only for slideshow tours (the internal
|
|
380
|
+
`slideshow_source` marker; other documents are unaffected). Convert
|
|
381
|
+
offline with `npm run convert:slideshow`; the full mapping is in
|
|
382
|
+
[docs/slideshow.md](slideshow.md).
|
|
383
|
+
|
|
384
|
+
## Events (unchanged, plus new ones)
|
|
385
|
+
|
|
386
|
+
The canonical reference is [docs/events.md](events.md) — one table per
|
|
387
|
+
emitter, with payloads. What changed in migration terms: `change` gains
|
|
388
|
+
`current_id`, `loaded`, `title`, `dataloaded`, `fontLoaded`,
|
|
389
|
+
`transitionstart`/`transitionend`, `error` and the constructor listener map
|
|
390
|
+
all work as before; `markerAdded`/`markerRemoved` still fire on the map
|
|
391
|
+
object; `imageready`, `markerclick` and `popupopen`/`popupclose` are new
|
|
392
|
+
(see above).
|
|
353
393
|
|
|
354
394
|
Two additions for IIIF tours: `await storymap.loadAnnotations()` fetches a
|
|
355
395
|
manifest's externally referenced annotation pages and appends them as stops,
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
# Slideshow tours as StoryMapJS data
|
|
2
|
+
|
|
3
|
+
Slideshow tours are W3C `AnnotationCollection` documents with per-stop
|
|
4
|
+
image targets and a `strollview` extension object (slideshow-style guided
|
|
5
|
+
image tours). The viewer reads them through
|
|
6
|
+
`slideshowToStorymapData()` (`src/storymap/from-slideshow.ts`), the
|
|
7
|
+
counterpart of `manifestToStorymapData()` for that format: pure, so the
|
|
8
|
+
same document always produces the same story. Detection is narrow
|
|
9
|
+
(`isSlideshowCollection` — type plus extension markers, never a P3
|
|
10
|
+
`Manifest`/`Collection`), auto-detects by default, and disables with the
|
|
11
|
+
`slideshow: false` option.
|
|
12
|
+
|
|
13
|
+
```sh
|
|
14
|
+
# convert a tour (URL or file) with optional player settings
|
|
15
|
+
npm run convert:slideshow -- --settings settings.json --out tour.storymap.json <tour-url-or-file>
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Slide mapping (one annotation = one slide, in page order)
|
|
19
|
+
|
|
20
|
+
| Tour field | Story field |
|
|
21
|
+
| ---------------------------------------- | --------------------------------------------------------------------------- |
|
|
22
|
+
| `label` | story `title` (first slide headline) |
|
|
23
|
+
| `creator` / `rights` | story `credit` (+ map attribution) |
|
|
24
|
+
| `TextualBody value` | `text.text` (`text/html` verbatim) |
|
|
25
|
+
| target `#x,y,w,h` | `location.region` (origins clamped) |
|
|
26
|
+
| annotation / canvas ids | `uniqueid` + `provenance` |
|
|
27
|
+
| `rotation` (non-zero) | `location.rotation` |
|
|
28
|
+
| `filters` | `location.filter` (`hue_rotate` → `hueRotate`) |
|
|
29
|
+
| `passepartout` + color/invert | `location.mask` |
|
|
30
|
+
| `audio` | `narration` (full flag bag) |
|
|
31
|
+
| `image_srv` | `location.basemap` (IIIF services and plain image files alike) |
|
|
32
|
+
| `image_static` | `media.url` + story `fallbackUrl` |
|
|
33
|
+
| `manifest_id` / `canvas_id` / `image_id` | `provenance.{manifest,canvas,image}` (canvas falls back to the target base) |
|
|
34
|
+
|
|
35
|
+
`rotation: 0`, `filters: false`, `passepartout: false` and `audio: false`
|
|
36
|
+
are omitted (the viewer defaults match). A target without a fragment, or
|
|
37
|
+
with an unusable one, keeps the whole canvas with a warning. Audio that
|
|
38
|
+
duplicates the slide media URL is kept once, as media.
|
|
39
|
+
|
|
40
|
+
## Legacy v1 tours
|
|
41
|
+
|
|
42
|
+
v1 documents (`AnnotationPageSequence`, one page per slide, `metadata`
|
|
43
|
+
with plain `title`/`author`/`license`) map page-by-page: bodies
|
|
44
|
+
concatenate with a space, the last `#x,y,w,h` fragment wins, the
|
|
45
|
+
`uniqueid` is the page's first annotation id (provenance comes from the
|
|
46
|
+
target's `manifest_id`/`canvas_id`/`image_id`), and the metadata becomes
|
|
47
|
+
title + credit. v1 has no filters/rotation/mask/audio/static fields.
|
|
48
|
+
Detection is by context plus shape, never Presentation 3.
|
|
49
|
+
|
|
50
|
+
## Player settings mapping
|
|
51
|
+
|
|
52
|
+
| Setting | Option |
|
|
53
|
+
| ------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ |
|
|
54
|
+
| `mode` | `mode` (`standard`/`static`) |
|
|
55
|
+
| `viewerheight` | `viewerheight` (validated `px`/`%`/`vh`) |
|
|
56
|
+
| `autoplay` + `slidetimeout` | `autoplay` ms (`false`/absent → `0`) |
|
|
57
|
+
| `fxmode` | `fxmode` (`basic` → `slide`) |
|
|
58
|
+
| `progressbar` | `progressbar` (`false`/`"off"` → `false`) |
|
|
59
|
+
| `textmode` | `textmode` |
|
|
60
|
+
| `textsize` | `textsize`, bottom dock only (side docks ignore it — the player drops the declaration too: `"20%"/2` is `NaN` inside `calc()`) |
|
|
61
|
+
| `hudcolor`/`hudbgcolor`/`hudopacity` | direct strings for the colors; `hudopacity` converts `"75"` → `75` |
|
|
62
|
+
| `shownav` | `shownav` |
|
|
63
|
+
| `showfullscreen` | `fullscreen` |
|
|
64
|
+
| `showinfo` | `show_info` |
|
|
65
|
+
| `showscrollbars`/`showheadings` | `show_scrollbars`/`show_headings` |
|
|
66
|
+
| `bgcolor` | `map_background_color` (approximation, documented) |
|
|
67
|
+
| `imgoverlay` + `imgoverlayurl` | fanned out to every slide's `imgoverlay` (`"50%"` → `0.5`) |
|
|
68
|
+
|
|
69
|
+
## Loss table (warned, one `console.warn` per kind)
|
|
70
|
+
|
|
71
|
+
Provenance identifiers beyond `uniqueid` (kept data-only in
|
|
72
|
+
`slide.provenance`), unfollowed `next` pages (inline documents; the URL
|
|
73
|
+
loader and CLI follow the chain), unknown `mode`/`fxmode`/`play`/`textmode`/
|
|
74
|
+
`progressbar` values (unknown `audio.play` falls back to `auto`),
|
|
75
|
+
unparsable bottom-dock `textsize`/`hudopacity`/`viewerheight`/`slidetimeout`
|
|
76
|
+
(`slidetimeout` falls back to 6000), overlay enabled without a URL,
|
|
77
|
+
unusable `passepartout` shapes (omitted), `imgoverlaysize` unparsable
|
|
78
|
+
(silently defaults to `0.5` with no warning), audio that duplicates the
|
|
79
|
+
slide media URL (kept once, as media), malformed targets/annotations, empty
|
|
80
|
+
pages (skipped). Everything else translates silently — legacy v1 tours map
|
|
81
|
+
fully (above) — and every translator output validates against
|
|
82
|
+
`schema/storymap.schema.json`.
|
|
83
|
+
|
|
84
|
+
Translated tours render through the slideshow-gated presentation fields
|
|
85
|
+
(`slideshow_source`), so internal documents are unaffected — see the
|
|
86
|
+
README's slideshow section.
|
|
87
|
+
|
|
88
|
+
## Corpus
|
|
89
|
+
|
|
90
|
+
Observed tours (structural facts only; no content archived). Hunt grounds
|
|
91
|
+
exhausted per the stop rule: Forum Wissen embeds are consent-walled,
|
|
92
|
+
code search doesn't index the tour JSONs, museum/partner repos hold only
|
|
93
|
+
manifests — the canonical
|
|
94
|
+
[`strollview-format-lib`](https://github.com/seigedigital/strollview-format-lib)
|
|
95
|
+
(v1/v2 parsers, samples) is the authoritative shape reference.
|
|
96
|
+
|
|
97
|
+
| Tour | Ver | Stops | Targets | Extras seen | Audio | Services |
|
|
98
|
+
| ------------------------- | --- | ----- | -------------------- | ----------------------------------------------------------------- | ------------------------ | --------------------------------------- |
|
|
99
|
+
| Uni der Dinge (Göttingen) | v2 | 19 | frag, bare, negative | filters obj, mask obj, rotation 0 | none | IIIF 2/3, custom API |
|
|
100
|
+
| 47 Ronin (emakimono) | v2 | 35 | frag | all `false` | none | single `.ptif` service |
|
|
101
|
+
| John Low (VKC) | v2 | 36 | frag, bare, negative | mask obj (incl. tiny/out-of-range), `image_static` | `auto`/`n/a`, Drive + S3 | IIIF 2/3 mixed |
|
|
102
|
+
| DDD AAA (test tour) | v2 | 17 | frag, bare | rotation 35/181, `play: "click"`, `application/ogg`, missing keys | `click` + `auto` | IIIF |
|
|
103
|
+
| Demo (Leipzig) | v1 | 8 pp | frag, bare | — (v1 has none) | — | IIIF 2 (`.jpx` bases serve `info.json`) |
|
|
104
|
+
| format-lib 1-01 | v1 | 8 pp | frag, bare | — | — | IIIF |
|
|
105
|
+
|
|
106
|
+
Never observed in the wild: `next` page chains, non-IIIF image files,
|
|
107
|
+
`audio.play` beyond `auto`/`click`, `mode`/`fxmode` beyond
|
|
108
|
+
`standard`/`basic`. Those paths are proven synthetically (paging chain
|
|
109
|
+
unit tests, local static-image e2e) and warn loudly if met.
|