Skip to content
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

show the diff in layer versions #465

Open
prigaux opened this issue Mar 8, 2017 · 5 comments
Open

show the diff in layer versions #465

prigaux opened this issue Mar 8, 2017 · 5 comments

Comments

@prigaux
Copy link

prigaux commented Mar 8, 2017

Hi,

After seeing github's showing changes https://github.com/blog/1772-diffable-more-customizable-maps
I wondered if it would be easy to have:

  • a javascript diff library for geojson
  • display the diff

So I tried for http://umap.openstreetmap.fr/fr/map/parkings-velo-paris-18e_129568#16/48.8903/2.3524,
and here is the (simple) result : http://mdb-idf.org/OSM/diff-layer.html#318917 (uses a simple umap fr proxy)

Missing:

  • the diff in properties (especially "name")
  • restrict to a limited number of "versions" to avoid big load on server or client (?)

Is this feature useful? Should I work on it to turn it into a pull request?

@yohanboniface
Copy link
Member

Very nice and promising!
This is definitely useful, but I feel like it's going to be hard to implement properly: what about changes in a geometry (not adding or removing one)? Changes in metadata (editing the name for example or changing the colour) ?

@prigaux
Copy link
Author

prigaux commented Mar 13, 2017

For geometry change, displaying the previous in red, and the new in green works quite nicely: the unchanged part is brown. See for example http://mdb-idf.org/OSM/diff-layer.html#270401, the 22/11/2016 modification.

For metadata changes, maybe a specific color could be used. For color or shape change, i don't have any good idea...

@yohanboniface
Copy link
Member

For color or shape change, i don't have any good idea...

We may always use basic shapes, even for markers (circle), with those colours:

  • green: created
  • red: removed
  • orange/brown: any metadata changed (even colour or shape), but no change in geo data

About the UI, I'd suggest displaying the diff on the map on mouse over in the list. Maybe adding a white semi-transparent overlay between the real map and the diff view, to have a bit of contrast and reduce colour clash.

That may be a nice MVP, and we could iterate again from there.

WDYT?

@prigaux
Copy link
Author

prigaux commented Mar 13, 2017

Ok, i'll try. I should have some time in april.

@prigaux
Copy link
Author

prigaux commented Apr 30, 2018

NB: I just noticed that by default umap only keeps a small number of versions (10 by default)

See LEAFLET_STORAGE_KEEP_VERSIONS used in purge_old_versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

2 participants