Skip to content

save map coordinates in localStorage#1220

Closed
vanithaak wants to merge 25 commits into
publiclab:mainfrom
vanithaak:setscale
Closed

save map coordinates in localStorage#1220
vanithaak wants to merge 25 commits into
publiclab:mainfrom
vanithaak:setscale

Conversation

@vanithaak

Copy link
Copy Markdown
Contributor

Fixes #998 (<=== Add issue number here)

Co-authored by: @7malikk

Make sure these boxes are checked before your pull request (PR) is ready to be reviewed and merged. Thanks!

  • PR is descriptively titled 📑 and links the original issue above 🔗
  • tests pass -- look for a green checkbox ✔️ a few minutes after opening your PR -- or run tests locally with grunt test
  • code is in uniquely-named feature branch and has no merge conflicts 📁
  • screenshots/GIFs are attached 📎 in case of UI updates
  • @mention the original creator of the issue in a comment below for help or for a review

We're happy to help you get this ready -- don't be afraid to ask for help, and don't be discouraged if your tests fail at first!

If tests do fail, click on the red X to learn why by reading the logs.

Please be sure you've reviewed our contribution guidelines at https://publiclab.org/contributing-to-public-lab-software

Thanks!

GIF

MapKnitter.Lite.-.Google.Chrome.2022-10-22.23-17-57.mp4

@gitpod-io

gitpod-io Bot commented Oct 22, 2022

Copy link
Copy Markdown

@vanithaak

Copy link
Copy Markdown
Contributor Author

@jywarren , @TildaDares , @cesswairimu please review our pr!

Comment thread examples/archive.html
event.preventDefault();
const url = input.value.replace('details', 'metadata');
let fetchedFrom
let splitUrl = url.split('/');

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, it looks like you may be mixing code from separate PRs here. This can happen if you work from your main branch and don't separate work into different branches. Could you reset it so these unrelated changes are not included in the PR?

You could try this -- https://stackoverflow.com/questions/7147270/hard-reset-of-a-single-file or just copy the version from the publiclab main branch (https://github.com/publiclab/Leaflet.DistortableImage) over your own and add it so there are no changes shown here. Let me know if you need help!

json.images = json.images.reverse();
json.avg_cm_per_pixel = this._getAvgCmPerPixel(json.images);

json.images.map(each=> localStorage.setItem('locations', JSON.stringify(each.nodes)));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here is your code, i see! Actually I wonder if this code should be outside the generateExportJson() method. Should there be a method like collection.saveToLocalStorage() instead? What do you think?

@jywarren

Copy link
Copy Markdown
Member

Oh no, I don't see your localstorage code anymore! Did you possibly overwrite it by mistake?

@7malikk

7malikk commented Oct 25, 2022

Copy link
Copy Markdown
Collaborator

@vanithaak

@jywarren

Copy link
Copy Markdown
Member

Ah should this be closed in favor of #1225 ?

@vanithaak

Copy link
Copy Markdown
Contributor Author

@jywarren, yes this pr should be closed. I have worked on #1225 now. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MapKnitter Lite: fetch images from Internet Archive

3 participants