omeka-s-modules / Mapping

GNU General Public License v3.0
8 stars 8 forks source link

Testing: Overlays #127

Open jimsafley opened 1 week ago

jimsafley commented 1 week ago

The map-by-groups-block-plus-optimization branch replaces the "WMS Overlays" section with an "Overlays" section in the "Map by attachments" and "Map by query" page blocks. The "Overlays" section allows page builders to add two types of overlays to their maps:

This will require a module upgrade. But before upgrading, make sure you have several WMS overlays already saved. After you've upgraded, they should be moved to the new "Overlays" section.

To test this, add a "Map by attachments" or "Map by query" block, open the "Overlays" section, select an overlay type, complete the form, save the overlay, and save the page. Check that the public map includes the overlay in the "Overlays" list, and that the overlay appears on the map when clicked. Add more overlays and edit/delete/move them. The overlay list on the public map should reflect the order you set.

A good source for WMS overlays is Map Warper. Browse the rectified maps, select one, go to the "Export" tab, and copy the "WMS Capabilities URL" link address. Use that URL as the WMS base URL.

A good source for IIIF Georeference Annotation overlays is Allmaps, specifically the examples at the bottom of that page. Go to those examples and copy the URL in the text input. Use that URL as the IIIF URL.

allanaaa commented 5 days ago

Sorry but because I'm updating from the branch to check on other issues, this

make sure you have several WMS overlays already saved. After you've upgraded, they should be moved to the new "Overlays" section.

can't be verified. I'm sure I must have had a WMS overlay in a block on one of my sites, but I don't see anything carried over. Perhaps we can get @katknow or @kimisgold to check this on their own sites?

jimsafley commented 5 days ago

I'm sure I must have had a WMS overlay in a block on one of my sites, but I don't see anything carried over.

Hmm. It's a simple upgrade, so I'm surprised. The most thorough way to test this is:

  1. Uninstall Mapping
  2. Checkout the master branch
  3. Add a few WMS overlays to a few Mapping blocks
  4. Checkout the map-by-groups-block-plus-optimization branch
  5. Upgrade Mapping

Obviously that will delete all your previous Mapping data, which isn't optimal I admit.

allanaaa commented 3 days ago

I added one overlay, saved the page, then immediately added a few more. When I saved I got that "CSRF token" error, next to the "successfully saved" bar, and the most recent overlay additions did not save.

Screenshot 2024-11-28 at 12 51 13
allanaaa commented 3 days ago

WMS overlays are displaying fine. IIIF overlays seem fickle. I can see them fine on Firefox in a private window, but not when logged-in, and not in Chrome.

Chrome console (when I click the "Fly to overlay" button):

index.js:9 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'digest') at yc (index.js:9:44) at qn (index.js:24:24) at kf.loadImageInfo (WarpedMap.js:327:59) at BaseRenderer.js:42:20 at Array.map () at Hp.loadMissingImageInfosInViewport (BaseRenderer.js:42:7) at Hp.render (WebGL2Renderer.js:409:52) at Pn._update (WarpedMapLayer.ts:947:19)

index.js:9 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'digest') at yc (index.js:9:44) at qn (index.js:24:24) at kf.loadImageInfo (WarpedMap.js:327:59) at BaseRenderer.js:42:20 at Array.map () at Hp.loadMissingImageInfosInViewport (BaseRenderer.js:42:7) at Hp.render (WebGL2Renderer.js:409:52) at Pn._update (WarpedMapLayer.ts:947:19)

index.js:9 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'digest') at yc (index.js:9:44) at qn (index.js:24:24) at kf.loadImageInfo (WarpedMap.js:327:59) at BaseRenderer.js:42:20 at Array.map () at Hp.loadMissingImageInfosInViewport (BaseRenderer.js:42:7) at Hp.render (WebGL2Renderer.js:409:52) at Pn._update (WarpedMapLayer.ts:947:19) at Pn._resized (WarpedMapLayer.ts:854:10)

Screenshot 2024-11-28 at 13 01 45
allanaaa commented 3 days ago

The "Fly to overlay" button does re-centre the map to the correct area even when the overlay itself doesn't display, so something there is working....

http://dev.omeka.org/amayer/amayer-s/omeka-s/s/my-omeka-s-site/page/maps-test (first map)