@projektemacher/storymapjs 0.10.3 → 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 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-mUk_qlWN.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
+ 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-mUk_qlWN.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});
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});