save map coordinates in localStorage#1220
Conversation
Co-authored-by: 7malikk <7malikk@gmail.com>
|
@jywarren , @TildaDares , @cesswairimu please review our pr! |
| event.preventDefault(); | ||
| const url = input.value.replace('details', 'metadata'); | ||
| let fetchedFrom | ||
| let splitUrl = url.split('/'); |
There was a problem hiding this comment.
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))); |
There was a problem hiding this comment.
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?
|
Oh no, I don't see your localstorage code anymore! Did you possibly overwrite it by mistake? |
|
Ah should this be closed in favor of #1225 ? |
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!
grunt testIf tests do fail, click on the red
Xto 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