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

Deleting node of a way with 2 nodes doesn't get visualized #296

Closed
geohacker opened this issue Jun 4, 2020 · 4 comments
Closed

Deleting node of a way with 2 nodes doesn't get visualized #296

geohacker opened this issue Jun 4, 2020 · 4 comments
Milestone

Comments

@geohacker
Copy link
Member

@LanesGood I noticed that when we delete a node of a way with just 2 nodes, it doesn't show up in modifiedSharedWays layer or editedGeojson layer. Obviously this is because it's no longer a valid LineString. What do you think we should do in these cases?

@geohacker geohacker added this to the v1.0-rc1 milestone Jun 4, 2020
@LanesGood
Copy link
Member

@geohacker can the remaining node be converted to a singular node in the editedGeoJSON layer? If so, we could either save it as a single node point (not sure if there's a valid use case there), or implement a special style that indicates that this node needs another node to be saved. If not, then users should not be able to delete the last two nodes on any lineString.

@geohacker
Copy link
Member Author

@LanesGood thank you. I inspected a bit more and this is a slightly complicated issue we need to address all the way from where the edits are created.

So few things to do:

  • Remove deleted nodes from the map Hide deleted nodes #303
  • When it's the last but one node that's deleted, add the node to deleted nodes, but keep the geometry so we can visualize. We'd probably add a property called deleted to style this differently
  • While creating the osm changeset, we'll manage this as a delete and not a modify. This will also modify any ways for which the deleted node is a part of.

cc @batpad

This was referenced Jun 8, 2020
@geohacker
Copy link
Member Author

The last thing to do in this workflow is to delete polygons with less than 3 nodes. Will close this once @batpad makes a PR for it.

@geohacker
Copy link
Member Author

This is now addressed. To finish the styles we should do #318

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

No branches or pull requests

2 participants