Skip to content

MapKnitter Lite: fetch images from Internet Archive #998

@jywarren

Description

@jywarren

This is for an idea for a static-served MapKnitter Lite.

Sketches of how this could look: https://docs.google.com/presentation/d/1kFXK0f3h2IsA2lml9L2s_REXm5p1ZGAVqfKUb9H_8Eo/edit?usp=sharing

N.B: To use MapKnitter Lite successfully, users must first upload their images to the Internet Archive and get a unique identifier or URL (for their image collection)

Guide to uploading images on Internet Archive: https://help.archive.org/help/uploading-a-basic-guide/

How to make a map:

Smaller issues

  • add a loading spinner on the "Place" buttons so people know it's still loading the image after you press it; check presence of image.width to confirm it's finished loading (i think this is the right shortcut to check image load completion?) Added spining icon for place on map button #1169
  • load image thumbnails in sidebar instead of full images (we should be able to tell from the Archive's collection response which are thumbnails) so we don't overload with a huge image collection load image in sidebar as thumbnail  #1319

Ways to save the map:

  • maps would still be exportable using our cloud exporter
  • saving the positions in localStorage
  • allowing download of the positions as a JSON file Download json file of saved positions  #1237
  • maybe generating a SVG of the map using the positions and client-side webgl-distort?
  • accepting a JSON file by URL or upload to load a map
  • detecting a JSON file that's dragged onto the map, and loading the images and centering them in the viewport
  • you could share the map by sharing a URL like: https://lite.mapknitter.org/#https://example.com/my-map.json if you're able to save the JSON file online. We could offer that on PL.org.

Bonus/stretch:

Code to fetch a gallery (CORS is now enabled for IA images):

$ $.get('https://archive.org/metadata/texas-barnraising/',function(response) { console.log(response) })
{readyState: 1, getResponseHeader: ƒ, getAllResponseHeaders: ƒ, setRequestHeader: ƒ, overrideMimeType: ƒ, …}
=> VM8221:1 {created: 1657632500, d1: 'ia600904.us.archive.org', d2: 'ia800904.us.archive.org', dir: '/27/items/texas-barnraising', files: Array(25), …}

$ i = new Image; i.src = "https://archive.org/download/texas-barnraising/IMG_0764.JPG";
=> 'https://archive.org/download/texas-barnraising/IMG_0764.JPG'
// will be at https://ia801507.us.archive.org/34/items/texas-barnraising/IMG_0764.JPG

$ i.width
=> 2592

This idea was explored in our GSoC ideas list here: https://publiclab.org/wiki/gsoc-ideas#MapKnitter+Local with the extra ideas:

Later projects/stretch goals

Something to bear in mind if you all make a lot of progress and are looking for things: #474 this issue gets at the relatively complicated external map exporter service, and it's not very well documented. If we could document it better that might go hand in hand with the local full-res map exporting mentioned above. -- @jywarren

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions