@projektemacher/storymapjs 0.10.2 → 0.10.4
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/README.md +27 -0
- package/dist/assets/{demo-rv3vz65J.js → demo-BbkXJcS5.js} +1 -1
- package/dist/assets/{harness-BnQbtq1l.js → harness-C4SHmAI-.js} +1 -1
- package/dist/assets/{main-mUk_qlWN.js → main-DEPPWqNX.js} +2 -2
- package/dist/css/storymap.css +1 -1
- package/dist/demo.html +2 -2
- package/dist/docs/migration.html +4 -1
- package/dist/docs/readme.html +20 -0
- package/dist/harness.html +2 -2
- package/dist/js/storymap.d.ts +11 -4
- package/dist/js/storymap.js +24 -3
- package/dist/js/storymap.js.map +1 -1
- package/package.json +1 -1
- package/schema/storymap.schema.json +1 -1
package/README.md
CHANGED
|
@@ -80,6 +80,33 @@ slide content panel is opaque (a solid background that hides the map behind it),
|
|
|
80
80
|
the initial fit accounts for the covered area so the story stays inside the
|
|
81
81
|
visible region.
|
|
82
82
|
|
|
83
|
+
### Custom tile templates
|
|
84
|
+
|
|
85
|
+
`map_type` accepts absolute or relative tile URL templates and style JSON URLs:
|
|
86
|
+
|
|
87
|
+
map_type: "https://tile.openstreetmap.org/{z}/{x}/{y}.png",
|
|
88
|
+
map_type: "./tiles/{z}/{x}/{y}.png", // same-origin, works on subpaths + Electron
|
|
89
|
+
map_type: "https://tiles.openfreemap.org/styles/bright", // vector style
|
|
90
|
+
|
|
91
|
+
Any value containing `{z}` renders as a raster XYZ layer; a path without `{z}`
|
|
92
|
+
that looks like a URL/path renders as a vector style layer; anything else falls
|
|
93
|
+
back to classic OSM raster.
|
|
94
|
+
|
|
95
|
+
### Switching the basemap at runtime
|
|
96
|
+
|
|
97
|
+
`storymap.setMapOption("map_type", next)` / `setMapOptions({...})` rebuilds the
|
|
98
|
+
main tile layer **and** the minimap (`ol/control/OverviewMap`) layer, keeping
|
|
99
|
+
the overview fitted to the marker bounds (zoomify/IIIF extents preserved). The
|
|
100
|
+
current slide is re-fitted after the swap.
|
|
101
|
+
|
|
102
|
+
### Icons
|
|
103
|
+
|
|
104
|
+
Default pins use the bundled `vco-icons` font (`dist/css/icons/`, referenced via
|
|
105
|
+
relative `./icons/...` URLs from `dist/css/storymap.css`), so pins render on
|
|
106
|
+
subpath deploys, bundler consumers (Vite leaves absolute `/css/...` untouched)
|
|
107
|
+
and `file://`/Electron hosts without extra configuration. Import the stylesheet
|
|
108
|
+
once (`import "@projektemacher/storymapjs/css/storymap.css"`).
|
|
109
|
+
|
|
83
110
|
## Custom HTML in slide content
|
|
84
111
|
|
|
85
112
|
Slide text is rendered as HTML: the `text` (and `headline`) fields accept
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./main-
|
|
1
|
+
import{t as e}from"./main-DEPPWqNX.js";import"./modulepreload-polyfill-P2Xu9kJm.js";function t(e){document.title=`StoryMapJS: `+e.title}window.storymap=new e(`storymap-embed`,`./demo.json`,{},{title:t});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./main-
|
|
1
|
+
import{t as e}from"./main-DEPPWqNX.js";import"./modulepreload-polyfill-P2Xu9kJm.js";window.__smErrors=[],window.__smReady=!1,window.addEventListener(`error`,e=>{window.__smErrors.push(String(e.message||e))});var t=new URLSearchParams(window.location.search),n=t.get(`manifest`),r=t.get(`url`),i=n===null?t.get(`example`):n,a=n===null?`/examples/`:`/examples-iiif/`,o={};if(t.get(`options`))try{o=JSON.parse(t.get(`options`))}catch(e){window.__smErrors.push(`harness: bad options param: `+e)}var s=r??a+i+`.json`;fetch(s).then(e=>e.json()).then(t=>{window.__sm=new e(`storymap-embed`,t,o,{}),window.__smReady=!0}).catch(e=>{window.__smErrors.push(`harness: `+(e&&e.message?e.message:String(e))),window.__smReady=!0});
|