-
Notifications
You must be signed in to change notification settings - Fork 284
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
save map coordinates in localStorage #1220
Conversation
Co-authored-by: 7malikk <7malikk@gmail.com>
@jywarren , @TildaDares , @cesswairimu please review our pr! |
examples/archive.html
Outdated
@@ -95,7 +95,9 @@ <h3 id="offcanvasRightLabel">Images</h3> | |||
form.addEventListener('submit', (event) => { | |||
event.preventDefault(); | |||
const url = input.value.replace('details', 'metadata'); | |||
let fetchedFrom | |||
let splitUrl = url.split('/'); |
There was a problem hiding this comment.
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!
@@ -218,7 +218,7 @@ L.DistortableCollection = L.FeatureGroup.extend({ | |||
|
|||
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.
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?
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 test
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