From 15c4ccd5c7f6a657ce8de8a76b4548f5142f7454 Mon Sep 17 00:00:00 2001 From: Adam Cox Date: Sat, 18 Apr 2026 16:09:31 -0500 Subject: [PATCH 01/16] move howitworks from svelte to raw html --- ohmg/frontend/static/css/site_base.css | 22 +++++ .../svelte_components/rollup.config.js | 1 - .../overviews/sections/HowItWorks.svelte | 94 ------------------- .../svelte_components/src/howitworks.js | 6 -- ohmg/frontend/templates/index.html | 68 +++++++++++++- 5 files changed, 88 insertions(+), 103 deletions(-) delete mode 100644 ohmg/frontend/svelte_components/src/components/overviews/sections/HowItWorks.svelte delete mode 100644 ohmg/frontend/svelte_components/src/howitworks.js diff --git a/ohmg/frontend/static/css/site_base.css b/ohmg/frontend/static/css/site_base.css index c5087162..f8cc49a1 100644 --- a/ohmg/frontend/static/css/site_base.css +++ b/ohmg/frontend/static/css/site_base.css @@ -609,3 +609,25 @@ img.lead-image { padding: 0px 5px; } } + +#step-list > div { + display: flex; + align-items: center; + padding-bottom: 5px; + margin-bottom: 5px; + border-bottom: dashed grey 1px; +} + +#step-list > div:first-child { + padding-top: 5px; + border-top: dashed grey 1px; +} + +#step-list div > div { + min-width: 85px; +} + +#step-list div > p { + font-size: 1.25em; + margin-bottom: 0px; +} \ No newline at end of file diff --git a/ohmg/frontend/svelte_components/rollup.config.js b/ohmg/frontend/svelte_components/rollup.config.js index aaf809ba..28b031fb 100644 --- a/ohmg/frontend/svelte_components/rollup.config.js +++ b/ohmg/frontend/svelte_components/rollup.config.js @@ -77,7 +77,6 @@ export default (cliArgs) => { 'LatestBlogPosts', 'MapBrowse', 'MapShowcase', - 'HowItWorks', 'Participants', 'Place', 'Browse', diff --git a/ohmg/frontend/svelte_components/src/components/overviews/sections/HowItWorks.svelte b/ohmg/frontend/svelte_components/src/components/overviews/sections/HowItWorks.svelte deleted file mode 100644 index 1e922b06..00000000 --- a/ohmg/frontend/svelte_components/src/components/overviews/sections/HowItWorks.svelte +++ /dev/null @@ -1,94 +0,0 @@ - - -

How it Works

-
-
-
- -
-

- Digital scans of Sanborn maps are available through the Library of Congress and are pulled into this site through their JSON API, generating a "Map Summary" page (Baton Rouge, 1885). -

-
-
-
- -
-

- Users prepare each sheet in the volume, sometimes splitting it into multiple regions, - each to be georeferenced individually (Baton Rouge, 1885, page 1). -

-
-
-
- -
-

- Next, each document must be georeferenced by creating ground control points, linking features on the old map with latitude/longitude coordinates to create a geospatial layer (Baton Rouge, 1885, page 1, part 3). -

-
-
-
- -
-

- As they are georeferenced, layers slowly build a collage of all the content from a given volume, and their - overlapping margins must be trimmed to create - a seamless mosaic. -

-
-
-
- -
-

- Finally, all volume mosaics for a given locale are automatically aggregated into a simple web viewer so you can - easily compare different years and current maps (Baton Rouge viewer). -

-
-

- Want to learn more? Visit the documentation site. -

-
- - diff --git a/ohmg/frontend/svelte_components/src/howitworks.js b/ohmg/frontend/svelte_components/src/howitworks.js deleted file mode 100644 index b5c18572..00000000 --- a/ohmg/frontend/svelte_components/src/howitworks.js +++ /dev/null @@ -1,6 +0,0 @@ -import HowItWorks from './components/overviews/sections/HowItWorks.svelte'; - -export default new HowItWorks({ - target: document.getElementById('howitworks-target'), - props: {}, -}); diff --git a/ohmg/frontend/templates/index.html b/ohmg/frontend/templates/index.html index e9bf3fb3..e925b370 100644 --- a/ohmg/frontend/templates/index.html +++ b/ohmg/frontend/templates/index.html @@ -18,7 +18,7 @@

OldInsuranceMaps.net

-

provides an open, online workflow for creating georeferenced layers of historical maps, with a special focus on making seamless mosaics from multi-page atlases in the Sanborn map collection at the Library of Congress.

+

provides an open, online workflow for creating georeferenced layers of historical maps, with a special focus on making seamless mosaics from multi-page atlases in the Sanborn map collection at the Library of Congress.

+
+ +
+ + + \ No newline at end of file diff --git a/ohmg/frontend/svelte_components/src/components/map/sections/Mosaic.svelte b/ohmg/frontend/svelte_components/src/components/map/sections/Mosaic.svelte new file mode 100644 index 00000000..6e0e0db4 --- /dev/null +++ b/ohmg/frontend/svelte_components/src/components/map/sections/Mosaic.svelte @@ -0,0 +1,195 @@ + + + + +
+ {#if activeTab == 'preview'} + {#key previewKey} + + {/key} + {:else if activeTab == 'multimask'} + {#if !CONTEXT.user.is_authenticated} + + {/if} + + + Masked layers: + {#if layerSetLookup[currentLayerSet].multimask_geojson} + {layerSetLookup[currentLayerSet].multimask_geojson.features.length}/{layerSetLookup[currentLayerSet].layers + .length} + {:else} + 0/{layerSetLookup[currentLayerSet].layers.length} + {/if} + + + Important: Do not work on a multimask while there is other work in progress on this + map (you could lose work). + + {#key multimaskKey} + + {/key} + {:else if activeTab == 'download'} +
+
+

+ Only layers that have been trimmed in the MultiMask will appear in the downloadable mosaic + files. You can access individual layers through the Georeferenced section. +

+
+
+ +
+
+ {#each LAYERSETS as ls} + {#if ls.layers.length >= 1} +

{ls.name} ({ls.layers.length} layer{ls.layers.length > 1 ? 's' : ''})

+ + + {#if ls.mosaic_cog_url} + + + + + + + + + + + + + {/if} + + + + + + + + + +
TileJSON + {CONTEXT.site_url}map/{MAP.identifier}/{ls.id}/tilejson +
OpenHistoricalMap editor + {#if ls.mosaic_cog_url} + {CONTEXT.site_url}map/{MAP.identifier}/{ls.id}/ohm + {:else} + n/a + {/if}
Download Cloud-Optimized GeoTIFF + {#if ls.mosaic_cog_url} + {CONTEXT.site_url}map/{MAP.identifier}/{ls.id}/cog + {:else} + n/a + {/if} +
IIIf Georef AnnotationPage (JSON) + {CONTEXT.site_url}iiif/mosaic/{MAP.identifier}/{ls.id}/?trim=true +
Allmaps + https://viewer.allmaps.org/?url={encodeURIComponent( + `${CONTEXT.site_url}iiif/mosaic/${MAP.identifier}/${ls.id}/?trim=true`, + )} +
+ {/if} + {/each} + {/if} +
+
+ + diff --git a/ohmg/frontend/svelte_components/src/components/map/sections/Summary.svelte b/ohmg/frontend/svelte_components/src/components/map/sections/Summary.svelte new file mode 100644 index 00000000..184a7364 --- /dev/null +++ b/ohmg/frontend/svelte_components/src/components/map/sections/Summary.svelte @@ -0,0 +1,140 @@ + + + +
+ +
+ {#if activeTab == 'details'} +
+
+
+

Record

+ + + + + + + + + + + + + + + + + + + +
TitleSanborn Map of {MAP.title}
Year{MAP.year}
Locale{MAP.locale.display_name}
Sourceloc.gov/item/{MAP.identifier}
+
+
+

Contributors & Attribution

+ + + + + + + + + + + + + + + + + + + +
Initial load + {#if MAP.progress.loaded_pages} + loaded by {MAP.loaded_by.name} - {MAP.loaded_by.date}
+ {:else}--{/if} +
Prep + {SESSION_SUMMARY.prep_ct} document{#if SESSION_SUMMARY.prep_ct != 1}s{/if} prepared{#if SESSION_SUMMARY.prep_ct > 0} by + {#each SESSION_SUMMARY.prep_contributors as c, n}{c.name} ({c.ct}){#if n != SESSION_SUMMARY.prep_contributors.length - 1}, + {/if}{/each}{/if} +
Georef + {SESSION_SUMMARY.georef_ct} georeferencing session{#if SESSION_SUMMARY.georef_ct != 1}s{/if}{#if SESSION_SUMMARY.georef_ct > 0} by + {#each SESSION_SUMMARY.georef_contributors as c, n}{c.name} ({c.ct}){#if n != SESSION_SUMMARY.georef_contributors.length - 1}, + {/if}{/each}{/if} +
Credit line:Library of Congress, Geography and Map Division, Sanborn Maps Collection.
+
+
+
+ {:else if activeTab == 'stats'} +
+

+ These users have contributed to the creation of the content within this map, by preparing or georeferencing + images. Currently, trimming or "multimask" work is not reflected in this table. +

+
+ + {:else if activeTab == 'activity'} +
+

+ Below is complete record of all preparation or georeferencing actions that have been performed on documents + within this map. Currently, trimming or "multimask" work is not reflected in this table. +

+
+ + {/if} +
+
+
+ + diff --git a/ohmg/frontend/svelte_components/src/components/overviews/sections/MapDetails.svelte b/ohmg/frontend/svelte_components/src/components/overviews/sections/MapDetails.svelte deleted file mode 100644 index d3d4779c..00000000 --- a/ohmg/frontend/svelte_components/src/components/overviews/sections/MapDetails.svelte +++ /dev/null @@ -1,261 +0,0 @@ - - - -
-
-
    -
  • - -
  • -
  • - -
  • -
  • - -
  • -
-
-
- {#if activeTab == 'details'} -
-
-
-

Record

- - - - - - - - - - - - - - - - - - - -
TitleSanborn Map of {MAP.title}
Year{MAP.year}
Locale{MAP.locale.display_name}
Sourceloc.gov/item/{MAP.identifier}
-
-
-

Contributors & Attribution

- - - - - - - - - - - - - - - - - - - -
Initial load - {#if MAP.progress.loaded_pages} - loaded by {MAP.loaded_by.name} - {MAP.loaded_by.date}
- {:else}--{/if} -
Prep - {SESSION_SUMMARY.prep_ct} document{#if SESSION_SUMMARY.prep_ct != 1}s{/if} prepared{#if SESSION_SUMMARY.prep_ct > 0} by - {#each SESSION_SUMMARY.prep_contributors as c, n}{c.name} ({c.ct}){#if n != SESSION_SUMMARY.prep_contributors.length - 1}, - {/if}{/each}{/if} -
Georef - {SESSION_SUMMARY.georef_ct} georeferencing session{#if SESSION_SUMMARY.georef_ct != 1}s{/if}{#if SESSION_SUMMARY.georef_ct > 0} by - {#each SESSION_SUMMARY.georef_contributors as c, n}{c.name} ({c.ct}){#if n != SESSION_SUMMARY.georef_contributors.length - 1}, - {/if}{/each}{/if} -
Credit line:Library of Congress, Geography and Map Division, Sanborn Maps Collection.
-
-
-
-
-
-

Mosaic Download & Web Services

-
-
- -
-
- {#each LAYERSETS as ls} - {#if ls.layers.length >= 1} -

{ls.name} ({ls.layers.length} layer{ls.layers.length > 1 ? 's' : ''})

- - - {#if ls.mosaic_cog_url} - - - - - - - - - - - - - {/if} - - - - - - - - - -
TileJSON - {CONTEXT.site_url}map/{MAP.identifier}/{ls.id}/tilejson -
OpenHistoricalMap editor - {#if ls.mosaic_cog_url} - {CONTEXT.site_url}map/{MAP.identifier}/{ls.id}/ohm - {:else} - n/a - {/if}
Download Cloud-Optimized GeoTIFF - {#if ls.mosaic_cog_url} - {CONTEXT.site_url}map/{MAP.identifier}/{ls.id}/cog - {:else} - n/a - {/if} -
IIIf Georef AnnotationPage (JSON) - {CONTEXT.site_url}iiif/mosaic/{MAP.identifier}/{ls.id}/?trim=true -
Allmaps - https://viewer.allmaps.org/?url={encodeURIComponent( - `${CONTEXT.site_url}iiif/mosaic/${MAP.identifier}/${ls.id}/?trim=true`, - )} -
- {/if} - {/each} -

- - Only layers that have been trimmed in the MultiMask will appear in the downloadable mosaic - files. You can access individual layers through the Georeferenced section. - -

- {:else if activeTab == 'stats'} -
-

- These users have contributed to the creation of the content within this map, by preparing or georeferencing - images. Currently, trimming or "multimask" work is not reflected in this table. -

-
- - {:else if activeTab == 'sessions'} -
-

- Below is complete record of all preparation or georeferencing actions that have been performed on documents - within this map. Currently, trimming or "multimask" work is not reflected in this table. -

-
- - {/if} -
-
- - From f6920226fee85fbc9f1aa9bf8f163c4c78c4b763 Mon Sep 17 00:00:00 2001 From: Adam Cox Date: Sun, 19 Apr 2026 11:46:40 -0500 Subject: [PATCH 05/16] better reorg of map overview page --- .../src/components/Map.svelte | 166 ++++++--------- .../src/components/base/TabbedSection.svelte | 2 +- .../src/components/map/Details.svelte | 74 +++++++ .../src/components/map/MosaicDownload.svelte | 92 +++++++++ .../components/map/MultimaskSection.svelte | 65 ++++++ .../src/components/map/sections/Mosaic.svelte | 195 ------------------ .../components/map/sections/Summary.svelte | 140 ------------- 7 files changed, 295 insertions(+), 439 deletions(-) create mode 100644 ohmg/frontend/svelte_components/src/components/map/Details.svelte create mode 100644 ohmg/frontend/svelte_components/src/components/map/MosaicDownload.svelte create mode 100644 ohmg/frontend/svelte_components/src/components/map/MultimaskSection.svelte delete mode 100644 ohmg/frontend/svelte_components/src/components/map/sections/Mosaic.svelte delete mode 100644 ohmg/frontend/svelte_components/src/components/map/sections/Summary.svelte diff --git a/ohmg/frontend/svelte_components/src/components/Map.svelte b/ohmg/frontend/svelte_components/src/components/Map.svelte index 9da0c42a..07115fe1 100644 --- a/ohmg/frontend/svelte_components/src/components/Map.svelte +++ b/ohmg/frontend/svelte_components/src/components/Map.svelte @@ -10,6 +10,7 @@ import InfoModalButton from './buttons/InfoModalButton.svelte'; import ExpandableSection from './base/ExpandableSection.svelte'; + import TabbedSection from './base/TabbedSection.svelte'; import Modal, { getModal } from './base/Modal.svelte'; import MapPreviewModal from './modals/MapPreviewModal.svelte'; @@ -31,8 +32,12 @@ import LoadingEllipsis from './common/LoadingEllipsis.svelte'; import LoadingMask from './common/LoadingMask.svelte'; - import Summary from './map/sections/Summary.svelte'; - import Mosaic from './map/sections/Mosaic.svelte'; + import MultimaskSection from './map/MultimaskSection.svelte' + import MosaicDownload from './map/MosaicDownload.svelte'; + import Details from './map/Details.svelte'; + + import MapContributors from './tables/MapContributors.svelte'; + import Sessions from './tables/Sessions.svelte'; import MapBreadcrumbs from './breadcrumbs/MapBreadcrumbs.svelte'; @@ -51,7 +56,6 @@ export let SESSION_SUMMARY; export let LAYERSETS; export let LAYERSET_CATEGORIES; - export let userFilterItems; const sessionLocks = { docs: {}, regs: {}, lyrs: {} }; $: { @@ -293,6 +297,9 @@ let processing = false; let previewRefreshable = false; + + let mosaicSectionActiveTab = "preview"; + let detailsSectionActiveTab = "details"; - + + {#if detailsSectionActiveTab == "details"} +
+ {:else if detailsSectionActiveTab == "stats"} +
+

+ These users have contributed to the creation of the content within this map, by preparing or georeferencing + images. Currently, trimming or "multimask" work is not reflected in this table. +

+
+ + {:else if detailsSectionActiveTab == "activity"} +
+

+ Below is complete record of all preparation or georeferencing actions that have been performed on documents + within this map. Currently, trimming or "multimask" work is not reflected in this table. +

+
+ + {/if} + - + + {#if mosaicSectionActiveTab == "preview"} + {#key previewKey} + + {/key} + {:else if mosaicSectionActiveTab == "multimask"} + + {:else if mosaicSectionActiveTab == "download"} + + {/if} +
@@ -593,63 +640,6 @@ {/each}
-
-
- - -
- {#if sectionVis['multimask']} -
- {#if !CONTEXT.user.is_authenticated} - - {/if} - - - Masked layers: - {#if layerSetLookup[currentLayerSet].multimask_geojson} - {layerSetLookup[currentLayerSet].multimask_geojson.features.length}/{layerSetLookup[currentLayerSet].layers - .length} - {:else} - 0/{layerSetLookup[currentLayerSet].layers.length} - {/if} - - - Important: Do not work on a multimask while there is other work in progress on this - map (you could lose work). - - {#key multimaskKey} - - {/key} -
- {/if} -
\ No newline at end of file diff --git a/ohmg/frontend/svelte_components/src/components/map/sections/Mosaic.svelte b/ohmg/frontend/svelte_components/src/components/map/sections/Mosaic.svelte deleted file mode 100644 index 6e0e0db4..00000000 --- a/ohmg/frontend/svelte_components/src/components/map/sections/Mosaic.svelte +++ /dev/null @@ -1,195 +0,0 @@ - - - - -
- {#if activeTab == 'preview'} - {#key previewKey} - - {/key} - {:else if activeTab == 'multimask'} - {#if !CONTEXT.user.is_authenticated} - - {/if} - - - Masked layers: - {#if layerSetLookup[currentLayerSet].multimask_geojson} - {layerSetLookup[currentLayerSet].multimask_geojson.features.length}/{layerSetLookup[currentLayerSet].layers - .length} - {:else} - 0/{layerSetLookup[currentLayerSet].layers.length} - {/if} - - - Important: Do not work on a multimask while there is other work in progress on this - map (you could lose work). - - {#key multimaskKey} - - {/key} - {:else if activeTab == 'download'} -
-
-

- Only layers that have been trimmed in the MultiMask will appear in the downloadable mosaic - files. You can access individual layers through the Georeferenced section. -

-
-
- -
-
- {#each LAYERSETS as ls} - {#if ls.layers.length >= 1} -

{ls.name} ({ls.layers.length} layer{ls.layers.length > 1 ? 's' : ''})

- - - {#if ls.mosaic_cog_url} - - - - - - - - - - - - - {/if} - - - - - - - - - -
TileJSON - {CONTEXT.site_url}map/{MAP.identifier}/{ls.id}/tilejson -
OpenHistoricalMap editor - {#if ls.mosaic_cog_url} - {CONTEXT.site_url}map/{MAP.identifier}/{ls.id}/ohm - {:else} - n/a - {/if}
Download Cloud-Optimized GeoTIFF - {#if ls.mosaic_cog_url} - {CONTEXT.site_url}map/{MAP.identifier}/{ls.id}/cog - {:else} - n/a - {/if} -
IIIf Georef AnnotationPage (JSON) - {CONTEXT.site_url}iiif/mosaic/{MAP.identifier}/{ls.id}/?trim=true -
Allmaps - https://viewer.allmaps.org/?url={encodeURIComponent( - `${CONTEXT.site_url}iiif/mosaic/${MAP.identifier}/${ls.id}/?trim=true`, - )} -
- {/if} - {/each} - {/if} -
-
- - diff --git a/ohmg/frontend/svelte_components/src/components/map/sections/Summary.svelte b/ohmg/frontend/svelte_components/src/components/map/sections/Summary.svelte deleted file mode 100644 index 184a7364..00000000 --- a/ohmg/frontend/svelte_components/src/components/map/sections/Summary.svelte +++ /dev/null @@ -1,140 +0,0 @@ - - - -
- -
- {#if activeTab == 'details'} -
-
-
-

Record

- - - - - - - - - - - - - - - - - - - -
TitleSanborn Map of {MAP.title}
Year{MAP.year}
Locale{MAP.locale.display_name}
Sourceloc.gov/item/{MAP.identifier}
-
-
-

Contributors & Attribution

- - - - - - - - - - - - - - - - - - - -
Initial load - {#if MAP.progress.loaded_pages} - loaded by {MAP.loaded_by.name} - {MAP.loaded_by.date}
- {:else}--{/if} -
Prep - {SESSION_SUMMARY.prep_ct} document{#if SESSION_SUMMARY.prep_ct != 1}s{/if} prepared{#if SESSION_SUMMARY.prep_ct > 0} by - {#each SESSION_SUMMARY.prep_contributors as c, n}{c.name} ({c.ct}){#if n != SESSION_SUMMARY.prep_contributors.length - 1}, - {/if}{/each}{/if} -
Georef - {SESSION_SUMMARY.georef_ct} georeferencing session{#if SESSION_SUMMARY.georef_ct != 1}s{/if}{#if SESSION_SUMMARY.georef_ct > 0} by - {#each SESSION_SUMMARY.georef_contributors as c, n}{c.name} ({c.ct}){#if n != SESSION_SUMMARY.georef_contributors.length - 1}, - {/if}{/each}{/if} -
Credit line:Library of Congress, Geography and Map Division, Sanborn Maps Collection.
-
-
-
- {:else if activeTab == 'stats'} -
-

- These users have contributed to the creation of the content within this map, by preparing or georeferencing - images. Currently, trimming or "multimask" work is not reflected in this table. -

-
- - {:else if activeTab == 'activity'} -
-

- Below is complete record of all preparation or georeferencing actions that have been performed on documents - within this map. Currently, trimming or "multimask" work is not reflected in this table. -

-
- - {/if} -
-
-
- - From 5e742b7f08a4ae1d7bfa8d8338185923e900e7a7 Mon Sep 17 00:00:00 2001 From: Adam Cox Date: Sun, 19 Apr 2026 18:06:13 -0500 Subject: [PATCH 06/16] preview modal content to section --- .../src/components/Map.svelte | 8 +------ .../components/interfaces/MapPreview.svelte | 12 ++++++++++ .../components/modals/MapPreviewModal.svelte | 23 ------------------- 3 files changed, 13 insertions(+), 30 deletions(-) delete mode 100644 ohmg/frontend/svelte_components/src/components/modals/MapPreviewModal.svelte diff --git a/ohmg/frontend/svelte_components/src/components/Map.svelte b/ohmg/frontend/svelte_components/src/components/Map.svelte index 07115fe1..5519292c 100644 --- a/ohmg/frontend/svelte_components/src/components/Map.svelte +++ b/ohmg/frontend/svelte_components/src/components/Map.svelte @@ -1,19 +1,14 @@ +

+ This preview shows progress toward a full mosaic of this map's content—as documents are processed they will automatically appear here. Compare with other years in the viewer. +

{#if refreshable} diff --git a/ohmg/frontend/svelte_components/src/components/modals/MapPreviewModal.svelte b/ohmg/frontend/svelte_components/src/components/modals/MapPreviewModal.svelte deleted file mode 100644 index 83c21885..00000000 --- a/ohmg/frontend/svelte_components/src/components/modals/MapPreviewModal.svelte +++ /dev/null @@ -1,23 +0,0 @@ - - - -

Mosaic Preview

-

- The Mosaic Preview shows progress toward a full mosaic of this item's content—as documents are - georeferenced, they will automatically appear here. -

-

- You can also view this mosaic alongside all other mosaics for this locale: {placeName} -

-
From b6e5c1628158142317491941b6a339a68a0d9f4d Mon Sep 17 00:00:00 2001 From: Adam Cox Date: Sun, 19 Apr 2026 18:49:40 -0500 Subject: [PATCH 07/16] acquire layersets from within mm section --- .../src/components/Map.svelte | 4 +-- .../components/interfaces/MultiMask.svelte | 7 ++--- .../components/map/MultimaskSection.svelte | 27 +++++++++++-------- 3 files changed, 21 insertions(+), 17 deletions(-) diff --git a/ohmg/frontend/svelte_components/src/components/Map.svelte b/ohmg/frontend/svelte_components/src/components/Map.svelte index 5519292c..fb1ce09f 100644 --- a/ohmg/frontend/svelte_components/src/components/Map.svelte +++ b/ohmg/frontend/svelte_components/src/components/Map.svelte @@ -93,7 +93,6 @@ }); } - let currentLayerSet = 'main-content'; let layerSetLookup = {}; let layerToLayerSetLookup = {}; let layerToLayerSetLookupOrig = {}; @@ -377,10 +376,9 @@ {:else if mosaicSectionActiveTab == "multimask"} {:else if mosaicSectionActiveTab == "download"} diff --git a/ohmg/frontend/svelte_components/src/components/interfaces/MultiMask.svelte b/ohmg/frontend/svelte_components/src/components/interfaces/MultiMask.svelte index f0cda9d5..843834da 100644 --- a/ohmg/frontend/svelte_components/src/components/interfaces/MultiMask.svelte +++ b/ohmg/frontend/svelte_components/src/components/interfaces/MultiMask.svelte @@ -295,7 +295,7 @@ }); $: { - if (viewer) { + if (viewer && !DISABLED) { viewer.interactions.draw.setActive(currentLayer != null); viewer.interactions.modify.setActive(!viewer.interactions.draw.getActive()); } @@ -475,7 +475,7 @@
{#each layerLookupUnmaskedArr as layer}
- addMask(layer)}> + addMask(layer)} disabled={DISABLED}> {#if CONTEXT.user.is_authenticated} @@ -484,6 +484,7 @@ action={() => { window.location.href = layer.georeferenceUrl; }} + disabled={DISABLED} > @@ -509,7 +510,7 @@
{#each layerLookupMaskedArr as layer}
- layerRemoveMask(layer)} title="remove this mask"> + layerRemoveMask(layer)} title="remove this layer's mask" disabled={DISABLED}> {#if CONTEXT.user.is_authenticated} diff --git a/ohmg/frontend/svelte_components/src/components/map/MultimaskSection.svelte b/ohmg/frontend/svelte_components/src/components/map/MultimaskSection.svelte index 87e55276..2eb2bca7 100644 --- a/ohmg/frontend/svelte_components/src/components/map/MultimaskSection.svelte +++ b/ohmg/frontend/svelte_components/src/components/map/MultimaskSection.svelte @@ -1,24 +1,25 @@ + let layerSetLookup = {}; + getFromAPI(`/api/beta2/layersets/?map=${mapId}`, CONTEXT.ohmg_api_headers, (response) => { + layerSetLookup = {}; + response.forEach(function (ls) { + layerSetLookup[ls.id] = ls + }); + }); + -{#if !CONTEXT.user.is_authenticated} - -{/if} +{#if layerSetLookup[currentLayerSet]} Masked layers: {#if layerSetLookup[currentLayerSet].multimask_geojson} @@ -41,12 +43,14 @@ 0/{layerSetLookup[currentLayerSet].layers.length} {/if} +{/if} Important: Do not work on a multimask while there is other work in progress on this map (you could lose work). +{#if layerSetLookup[currentLayerSet]} {#key multimaskKey} {/key} +{/if} diff --git a/ohmg/frontend/svelte_components/src/components/cards/LayerCard.svelte b/ohmg/frontend/svelte_components/src/components/cards/LayerCard.svelte index f8e9db73..1b1c0550 100644 --- a/ohmg/frontend/svelte_components/src/components/cards/LayerCard.svelte +++ b/ohmg/frontend/svelte_components/src/components/cards/LayerCard.svelte @@ -6,7 +6,7 @@ import { getModal } from '../base/Modal.svelte'; - import Link from '../common/Link.svelte'; + import Link from '../base/Link.svelte'; import BaseCard from '../base/Card.svelte'; diff --git a/ohmg/frontend/svelte_components/src/components/cards/MapItem.svelte b/ohmg/frontend/svelte_components/src/components/cards/MapItem.svelte index 455a8203..3b94eaef 100644 --- a/ohmg/frontend/svelte_components/src/components/cards/MapItem.svelte +++ b/ohmg/frontend/svelte_components/src/components/cards/MapItem.svelte @@ -1,5 +1,5 @@ diff --git a/ohmg/frontend/svelte_components/src/components/cards/NonMapCard.svelte b/ohmg/frontend/svelte_components/src/components/cards/NonMapCard.svelte index 3f0661f4..d9f1b077 100644 --- a/ohmg/frontend/svelte_components/src/components/cards/NonMapCard.svelte +++ b/ohmg/frontend/svelte_components/src/components/cards/NonMapCard.svelte @@ -3,7 +3,7 @@ import { getModal } from '../base/Modal.svelte'; - import Link from '../common/Link.svelte'; + import Link from '../base/Link.svelte'; import BaseCard from '../base/Card.svelte'; diff --git a/ohmg/frontend/svelte_components/src/components/cards/PreparedCard.svelte b/ohmg/frontend/svelte_components/src/components/cards/PreparedCard.svelte index b8b1d9f9..9c442fc2 100644 --- a/ohmg/frontend/svelte_components/src/components/cards/PreparedCard.svelte +++ b/ohmg/frontend/svelte_components/src/components/cards/PreparedCard.svelte @@ -6,7 +6,7 @@ import { getModal } from '../base/Modal.svelte'; - import Link from '../common/Link.svelte'; + import Link from '../base/Link.svelte'; import BaseCard from '../base/Card.svelte'; diff --git a/ohmg/frontend/svelte_components/src/components/cards/SkippedCard.svelte b/ohmg/frontend/svelte_components/src/components/cards/SkippedCard.svelte index a4984a39..cc3cfa43 100644 --- a/ohmg/frontend/svelte_components/src/components/cards/SkippedCard.svelte +++ b/ohmg/frontend/svelte_components/src/components/cards/SkippedCard.svelte @@ -3,7 +3,7 @@ import { getModal } from '../base/Modal.svelte'; - import Link from '../common/Link.svelte'; + import Link from '../base/Link.svelte'; import BaseCard from '../base/Card.svelte'; diff --git a/ohmg/frontend/svelte_components/src/components/cards/UnpreparedCard.svelte b/ohmg/frontend/svelte_components/src/components/cards/UnpreparedCard.svelte index c89c153a..ac6641ca 100644 --- a/ohmg/frontend/svelte_components/src/components/cards/UnpreparedCard.svelte +++ b/ohmg/frontend/svelte_components/src/components/cards/UnpreparedCard.svelte @@ -7,7 +7,7 @@ import { getModal } from '../base/Modal.svelte'; - import Link from '../common/Link.svelte'; + import Link from '../base/Link.svelte'; import LoadingEllipsis from '../common/LoadingEllipsis.svelte'; import BaseCard from '../base/Card.svelte'; diff --git a/ohmg/frontend/svelte_components/src/components/common/SVGIcon.svelte b/ohmg/frontend/svelte_components/src/components/common/SVGIcon.svelte deleted file mode 100644 index 4c62629b..00000000 --- a/ohmg/frontend/svelte_components/src/components/common/SVGIcon.svelte +++ /dev/null @@ -1,13 +0,0 @@ - - - diff --git a/ohmg/frontend/svelte_components/src/components/interfaces/MapPreview.svelte b/ohmg/frontend/svelte_components/src/components/interfaces/MapPreview.svelte index 56785336..6aecf878 100644 --- a/ohmg/frontend/svelte_components/src/components/interfaces/MapPreview.svelte +++ b/ohmg/frontend/svelte_components/src/components/interfaces/MapPreview.svelte @@ -8,14 +8,13 @@ import { createEmpty, extend } from 'ol/extent'; import { transformExtent } from 'ol/proj'; - import Link from '../common/Link.svelte'; + import Link from '../base/Link.svelte'; - import ExpandElement from '../buttons/ExpandElement.svelte'; - import RefreshMapButton from '../buttons/RefreshMapButton.svelte'; - import TransparencySlider from '../buttons/TransparencySlider.svelte'; - import ToolUIButton from '../buttons/ToolUIButton.svelte'; - - import MapboxLogoLink from '../common/MapboxLogoLink.svelte'; + import ExpandElement from './widgets/ExpandElement.svelte'; + import RefreshMapButton from './widgets/RefreshMapButton.svelte'; + import TransparencySlider from './widgets/TransparencySlider.svelte'; + import ToolUIButton from './widgets/ToolUIButton.svelte'; + import MapboxLogoLink from './widgets/MapboxLogoLink.svelte'; import { getModal } from '../base/Modal.svelte'; import LegendModal from '../modals/LegendModal.svelte'; diff --git a/ohmg/frontend/svelte_components/src/components/interfaces/MultiMask.svelte b/ohmg/frontend/svelte_components/src/components/interfaces/MultiMask.svelte index 9c3fd5bf..92081dec 100644 --- a/ohmg/frontend/svelte_components/src/components/interfaces/MultiMask.svelte +++ b/ohmg/frontend/svelte_components/src/components/interfaces/MultiMask.svelte @@ -31,8 +31,8 @@ import Crop from 'ol-ext/filter/Crop'; - import ToolUIButton from '../buttons/ToolUIButton.svelte'; - import ExpandElement from '../buttons/ExpandElement.svelte'; + import ToolUIButton from './widgets/ToolUIButton.svelte'; + import ExpandElement from './widgets/ExpandElement.svelte'; import { usaExtent } from '../../lib/utils'; import { MapViewer } from '../../lib/viewers'; diff --git a/ohmg/frontend/svelte_components/src/components/buttons/ExpandElement.svelte b/ohmg/frontend/svelte_components/src/components/interfaces/widgets/ExpandElement.svelte similarity index 100% rename from ohmg/frontend/svelte_components/src/components/buttons/ExpandElement.svelte rename to ohmg/frontend/svelte_components/src/components/interfaces/widgets/ExpandElement.svelte diff --git a/ohmg/frontend/svelte_components/src/components/common/MapboxLogoLink.svelte b/ohmg/frontend/svelte_components/src/components/interfaces/widgets/MapboxLogoLink.svelte similarity index 100% rename from ohmg/frontend/svelte_components/src/components/common/MapboxLogoLink.svelte rename to ohmg/frontend/svelte_components/src/components/interfaces/widgets/MapboxLogoLink.svelte diff --git a/ohmg/frontend/svelte_components/src/components/buttons/RefreshMapButton.svelte b/ohmg/frontend/svelte_components/src/components/interfaces/widgets/RefreshMapButton.svelte similarity index 91% rename from ohmg/frontend/svelte_components/src/components/buttons/RefreshMapButton.svelte rename to ohmg/frontend/svelte_components/src/components/interfaces/widgets/RefreshMapButton.svelte index b7acefa5..c0914200 100644 --- a/ohmg/frontend/svelte_components/src/components/buttons/RefreshMapButton.svelte +++ b/ohmg/frontend/svelte_components/src/components/interfaces/widgets/RefreshMapButton.svelte @@ -1,5 +1,5 @@

How to use XYZ tiles in desktop software

diff --git a/ohmg/frontend/svelte_components/src/components/overviews/sections/LatestBlogPosts.svelte b/ohmg/frontend/svelte_components/src/components/overviews/sections/LatestBlogPosts.svelte index 645e0846..167cf54c 100644 --- a/ohmg/frontend/svelte_components/src/components/overviews/sections/LatestBlogPosts.svelte +++ b/ohmg/frontend/svelte_components/src/components/overviews/sections/LatestBlogPosts.svelte @@ -1,5 +1,5 @@ -
-
-
-

Record

- - - - - - - - - - - - - - - - - - - -
TitleSanborn Map of {MAP.title}
Year{MAP.year}
Locale{MAP.locale.display_name}
Sourceloc.gov/item/{MAP.identifier}
-
-
-

Contributors & Attribution

- - - - - - - - - - - - - - - - - - - -
Initial load - {#if MAP.progress.loaded_pages} - loaded by {MAP.loaded_by.name} - {MAP.loaded_by.date}
- {:else}--{/if} -
Prep - {SESSION_SUMMARY.prep_ct} document{#if SESSION_SUMMARY.prep_ct != 1}s{/if} prepared{#if SESSION_SUMMARY.prep_ct > 0} by +
+

Record

+
+
Title
+
Sanborn Map of {MAP.title}
+
Year
+
{MAP.year}
+
Locale
+
{MAP.locale.display_name}
+
Source
+
loc.gov/item/{MAP.identifier}
+
Credit line
+
Library of Congress, Geography and Map Division, Sanborn Maps Collection.
+
+ {#if MAP.progress.loaded_pages} +
+

added to OldInsuranceMaps.net by {MAP.loaded_by.name}, + {MAP.loaded_by.date}; + {SESSION_SUMMARY.prep_ct} document{#if SESSION_SUMMARY.prep_ct != 1}s{/if} prepared{#if SESSION_SUMMARY.prep_ct > 0} by {#each SESSION_SUMMARY.prep_contributors as c, n}{c.name} ({c.ct}){#if n != SESSION_SUMMARY.prep_contributors.length - 1}, - {/if}{/each}{/if} -

Georef - {SESSION_SUMMARY.georef_ct} georeferencing session{#if SESSION_SUMMARY.georef_ct != 1}s{/if}{#if SESSION_SUMMARY.georef_ct > 0} by + {/if}{/each}{/if}; + {SESSION_SUMMARY.georef_ct} georeferencing session{#if SESSION_SUMMARY.georef_ct != 1}s{/if}{#if SESSION_SUMMARY.georef_ct > 0} by {#each SESSION_SUMMARY.georef_contributors as c, n}{c.name} ({c.ct}){#if n != SESSION_SUMMARY.georef_contributors.length - 1}, {/if}{/each}{/if} -
Credit line:Library of Congress, Geography and Map Division, Sanborn Maps Collection.
-
+ +

+ {/if}
-
\ No newline at end of file + \ No newline at end of file diff --git a/ohmg/frontend/svelte_components/src/components/map/MosaicDownload.svelte b/ohmg/frontend/svelte_components/src/components/map/MosaicDownload.svelte index 60d820ad..99625ea9 100644 --- a/ohmg/frontend/svelte_components/src/components/map/MosaicDownload.svelte +++ b/ohmg/frontend/svelte_components/src/components/map/MosaicDownload.svelte @@ -1,92 +1,126 @@ -
-
-

- Only layers that have been trimmed in the MultiMask will appear in the downloadable mosaic - files. You can access individual layers through the Georeferenced section. -

-
-
- -
+
+

+ Once layers have been trimmed in the MultiMask, a background process can be run + to combine them into a single mosaic file, which serves as a basis for downloads and web services. + If you see n/a below, the mosaic has not yet been created. You can still access + individual layers through the Georeferenced section, or view the mosaic in Allmaps + (powered by IIIF). +

-{#each LAYERSETS as ls} +{#each orderedLayersets as ls} {#if ls.layers.length >= 1} -

{ls.name} ({ls.layers.length} layer{ls.layers.length > 1 ? 's' : ''})

- - +

{`${ls.name} (${ls.layers.length} layer${ls.layers.length > 1 ? 's' : ''})`}

+
+
TileJSON
+
{#if ls.mosaic_cog_url} -
- - - - - - - - - - - + {CONTEXT.site_url}map/{MAP.identifier}/{ls.id}/tilejson + {:else} + n/a {/if} - - - - - - - - - -
TileJSON - {CONTEXT.site_url}map/{MAP.identifier}/{ls.id}/tilejson -
OpenHistoricalMap editor - {#if ls.mosaic_cog_url} - {CONTEXT.site_url}map/{MAP.identifier}/{ls.id}/ohm - {:else} - n/a - {/if}
Download Cloud-Optimized GeoTIFF - {#if ls.mosaic_cog_url} - {CONTEXT.site_url}map/{MAP.identifier}/{ls.id}/cog - {:else} - n/a - {/if} -
IIIF Georef AnnotationPage (JSON) - {CONTEXT.site_url}iiif/mosaic/{MAP.identifier}/{ls.id}/?trim=true +
OpenHistoricalMap iD editor
+
{#if ls.mosaic_cog_url} + {CONTEXT.site_url}map/{MAP.identifier}/{ls.id}/ohm -
Allmaps - https://viewer.allmaps.org/?url={encodeURIComponent( - `${CONTEXT.site_url}iiif/mosaic/${MAP.identifier}/${ls.id}/?trim=true`, - )} -
+ {:else} + n/a + {/if} +
Cloud-Optimized GeoTIFF
+
+ {#if ls.mosaic_cog_url} + {CONTEXT.site_url}map/{MAP.identifier}/{ls.id}/cog + {:else} + n/a + {/if} +
+
IIIF Georef AnnotationPage (JSON)
+
+ {CONTEXT.site_url}iiif/mosaic/{MAP.identifier}/{ls.id}/?trim=true +
+
Allmaps
+
+ https://viewer.allmaps.org/?url={encodeURIComponent( + `${CONTEXT.site_url}iiif/mosaic/${MAP.identifier}/${ls.id}/?trim=true`, + )} +
+ {/if} -{/each} \ No newline at end of file +{/each} + + \ No newline at end of file diff --git a/ohmg/frontend/svelte_components/src/components/overviews/sections/ResourceDetails.svelte b/ohmg/frontend/svelte_components/src/components/overviews/sections/ResourceDetails.svelte deleted file mode 100644 index e4c49928..00000000 --- a/ohmg/frontend/svelte_components/src/components/overviews/sections/ResourceDetails.svelte +++ /dev/null @@ -1,179 +0,0 @@ - - - - -

Resource Details

- - - - - - - - - - - -
TitleSanborn Map of {RESOURCE.title}
Status{RESOURCE.status}
-{#if !MAP.hidden} -
-

Downloads & Web Services

- -
- - - - - - - - - - - - - - - - - - - -
Image - {#if jpegUrl} - JPEG - {/if} - {#if cogUrl} - • - GeoTIFF - {/if} -
Ground Control Points - {#if gcpsGeojsonUrl || gcpsPointsUrl} - - - {:else} - n/a - {/if} -
XYZ Tiles URL - {#if xyzUrl} -
{xyzUrl}
- {:else} - n/a - {/if} -
OHM - {#if ohmUrl} - Open in OpenHistoricalMap iD editor - {:else} - n/a - {/if}
-{/if} - - diff --git a/ohmg/frontend/svelte_components/src/components/resource/Details.svelte b/ohmg/frontend/svelte_components/src/components/resource/Details.svelte new file mode 100644 index 00000000..57d7da1d --- /dev/null +++ b/ohmg/frontend/svelte_components/src/components/resource/Details.svelte @@ -0,0 +1,137 @@ + + + + +

Record

+
+
Title
+
Sanborn Map of {RESOURCE.title}
+
Status
+
{RESOURCE.status}
+
+{#if !MAP.hidden} +

Downloads & Web Services

+
+
Image
+
+ {#if jpegUrl} + JPEG + {/if} + {#if cogUrl} + • + GeoTIFF + {/if} +
+
Ground Control Points
+
+ {#if gcpsGeojsonUrl || gcpsPointsUrl} + + + {:else} + n/a + {/if} +
+
XYZ Tiles URL
+
+ {#if xyzUrl} +
{xyzUrl}
+ {:else} + n/a + {/if} +
+
OHM
+
+ {#if ohmUrl} + Open in OpenHistoricalMap iD editor + {:else} + n/a + {/if}
+
+{/if} + + From f243443ee97f1fd2f254f47a7da748abecc345c8 Mon Sep 17 00:00:00 2001 From: Adam Cox Date: Thu, 23 Apr 2026 11:10:33 -0500 Subject: [PATCH 13/16] fix mask geojson acquisition bug --- ohmg/extensions/iiif.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ohmg/extensions/iiif.py b/ohmg/extensions/iiif.py index 37f80028..f1d0c492 100644 --- a/ohmg/extensions/iiif.py +++ b/ohmg/extensions/iiif.py @@ -1,3 +1,5 @@ +import json + from django.conf import settings from django.contrib.gis.gdal import CoordTransform, SpatialReference from django.contrib.gis.geos import Polygon @@ -30,8 +32,8 @@ def get_target(self): if self.layer.mask: wgs84 = osr.SpatialReference() wgs84.ImportFromEPSG(4326) - - coords = self.layer.mask.geojson["coordinates"][0] + mask_geojson = json.loads(self.layer.mask.geojson) + coords = mask_geojson["coordinates"][0] ct = CoordTransform(SpatialReference("WGS84"), SpatialReference("EPSG:3857")) polygon = Polygon(coords) polygon.transform(ct) From 5e6fb79cfb8561d8ed9263d695b7bc227df997bd Mon Sep 17 00:00:00 2001 From: Adam Cox Date: Fri, 24 Apr 2026 23:45:28 +0000 Subject: [PATCH 14/16] update name of download section --- ohmg/frontend/svelte_components/src/components/Map.svelte | 2 +- .../svelte_components/src/components/resource/Details.svelte | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ohmg/frontend/svelte_components/src/components/Map.svelte b/ohmg/frontend/svelte_components/src/components/Map.svelte index 39c41d13..c7ad9fed 100644 --- a/ohmg/frontend/svelte_components/src/components/Map.svelte +++ b/ohmg/frontend/svelte_components/src/components/Map.svelte @@ -355,7 +355,7 @@ {#if mosaicSectionActiveTab == "preview"} {#key previewKey} diff --git a/ohmg/frontend/svelte_components/src/components/resource/Details.svelte b/ohmg/frontend/svelte_components/src/components/resource/Details.svelte index 57d7da1d..e5581adf 100644 --- a/ohmg/frontend/svelte_components/src/components/resource/Details.svelte +++ b/ohmg/frontend/svelte_components/src/components/resource/Details.svelte @@ -69,7 +69,7 @@
{RESOURCE.status}
{#if !MAP.hidden} -

Downloads & Web Services

+

Downloads & Services

Image
From 1f373b0400130f948ed904501122b13604eacff1 Mon Sep 17 00:00:00 2001 From: Adam Cox Date: Fri, 24 Apr 2026 23:45:47 +0000 Subject: [PATCH 15/16] fix syntax error --- ohmg/frontend/svelte_components/src/components/Splitter.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ohmg/frontend/svelte_components/src/components/Splitter.svelte b/ohmg/frontend/svelte_components/src/components/Splitter.svelte index 0f5af727..36552c0e 100644 --- a/ohmg/frontend/svelte_components/src/components/Splitter.svelte +++ b/ohmg/frontend/svelte_components/src/components/Splitter.svelte @@ -34,7 +34,7 @@ import Modal, { getModal } from './base/Modal.svelte'; import ConfirmNoSplitModal from './modals/ConfirmNoSplitModal.svelte'; - import ToolUIButton from './interfaces/widgets/ToolUIButton.svelte';s + import ToolUIButton from './interfaces/widgets/ToolUIButton.svelte'; import ExtendSessionModal from './modals/ExtendSessionModal.svelte'; export let CONTEXT; From 0d47fef593f4110ab5b5af5c67f215ea589a9d10 Mon Sep 17 00:00:00 2001 From: Adam Cox Date: Fri, 24 Apr 2026 23:46:19 +0000 Subject: [PATCH 16/16] handle mexico map load from LOC --- ohmg/core/utils/__init__.py | 3 +++ ohmg/extensions/loc_sanborn.py | 2 ++ 2 files changed, 5 insertions(+) diff --git a/ohmg/core/utils/__init__.py b/ohmg/core/utils/__init__.py index 6401abe0..f78cea99 100644 --- a/ohmg/core/utils/__init__.py +++ b/ohmg/core/utils/__init__.py @@ -60,6 +60,7 @@ def random_alnum(size=6): ("connecticut", "Connecticut"), ("delaware", "Delaware"), ("district of columbia", "District of Columbia"), + ("distrito federal", "Distrito Federal"), ("florida", "Florida"), ("georgia", "Georgia"), ("hawaii", "Hawaii"), @@ -113,6 +114,7 @@ def random_alnum(size=6): "connecticut": "Conn.", "delaware": "Del.", "district of columbia": "D.C.", + "distrito federal": "D.F.", "florida": "Fla.", "georgia": "Ga.", "hawaii": "Hawaii", @@ -166,6 +168,7 @@ def random_alnum(size=6): "connecticut": "cn", "delaware": "de", "district of columbia": "dc", + "distrito federal": "df", "florida": "fl", "georgia": "ga", "hawaii": "hi", diff --git a/ohmg/extensions/loc_sanborn.py b/ohmg/extensions/loc_sanborn.py index f9351d76..374404a8 100644 --- a/ohmg/extensions/loc_sanborn.py +++ b/ohmg/extensions/loc_sanborn.py @@ -128,6 +128,8 @@ def parse_location_info(self): # get state from the last item in the item title, easy state_names = [i[1] for i in STATE_CHOICES] state_seg = title_segs[-1] + if state_seg.endswith("(Mexico)"): + state_seg = state_seg[:-8].rstrip() if state_seg in state_names: self.state = state_seg.lower() # remove the location tag for the state