umap-project / umap

uMap lets you create maps with OpenStreetMap layers in a minute and embed them in your site.
https://umap-project.org
Other
1.15k stars 219 forks source link

show the diff in layer versions #465

Open prigaux opened 7 years ago

prigaux commented 7 years ago

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:

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:

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

yohanboniface commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

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:

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 commented 7 years ago

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

prigaux commented 6 years ago

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.