publiclab / Leaflet.DistortableImage

A Leaflet extension to distort or "rubber sheet" images
https://publiclab.github.io/Leaflet.DistortableImage/examples/
BSD 2-Clause "Simplified" License
265 stars 284 forks source link

older &json= links don't work now? #1372

Closed jywarren closed 1 year ago

jywarren commented 1 year ago

Hi, @segun-codes @7malikk - i noticed maybe the older ?json= URLs no longer work --

https://publiclab.github.io/Leaflet.DistortableImage/examples/archive?json=https://archive.org/download/mapknitter-wayback/ceres--2.json

https://publiclab.github.io/Leaflet.DistortableImage/examples/archive?json=https://ia801508.us.archive.org/17/items/sanborn-1885/mapknitter-1676394104542.json

Was this intentional, or maybe we just missed it due to not having tests? No big deal, but I think there's still a strong case for preserving ?json=, in case people store their JSON files somewhere else.

No worries, this is the kind of thing tests would help us catch!

segun-codes commented 1 year ago

Oh! I removed support for older ?json= since we migrated to shorter URL pattern. It was intentionally removed, not a bug. Since, there's still a need for it, I'll restore the support.

jywarren commented 1 year ago

I think it makes sense since people could host .json files in other places too -- sorry, I should have noticed that! Thank you!!!

On Tue, Feb 28, 2023 at 1:27 PM Segun @.***> wrote:

Oh! I removed support for older JSON since we migrated to shorter URL pattern. It was intentionally removed, not an error. Do you want to have it back?

— Reply to this email directly, view it on GitHub https://github.com/publiclab/Leaflet.DistortableImage/issues/1372#issuecomment-1448664272, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAF6J7XVRFQ5GONFUWTTF3WZY7SLANCNFSM6AAAAAAVLBIDY4 . You are receiving this because you authored the thread.Message ID: @.***>

segun-codes commented 1 year ago

Hi @jywarren, just to be certain. Does this mean support for ?json= should be limited to only MK-Lite generated Json files and not legacy json files from mapknitter.org?

jywarren commented 1 year ago

Hi @segun-codes -- I believe we should support both. Is the code flow set up such that we can simply hand it off to the JSON interpreter function and it will auto-detect which type, and deal accordingly? That would be a really useful way to structure the code. Thanks @segun-codes !!

segun-codes commented 1 year ago

Okay, I will ensure the code is structured this way. Many thanks!