bryceco / GoMap

OpenStreetMap editor for iPhone/iPad
ISC License
324 stars 41 forks source link

Different colors for ways that are new and modified #764

Closed mtzfederico closed 4 months ago

mtzfederico commented 5 months ago

I would like to be able to easily tell which areas (ways that map a building) have been created and not uploaded and which ones have been modified from the rest. My first idea was to give specific colors to ways that have been created and modified, once the changes have been uploaded they should go to the default colors.

My use case is that I like to map buildings using satellite imagery and add as many tags to it as I can before going out. When I am outside I use quests to know which places are missing info, but I would like to easily and quickly know which ones I should focus on (specially to make sure that the bounds are good).

I took a look at the code, but I am not sure how this could be best implemented.

bryceco commented 5 months ago

If you want to experiment with this you can add

if object.isModified() {
    renderInfo.lineColor = .red
}

here:

https://github.com/bryceco/GoMap/blob/8c4cfe23d63a2d24ceb08b64c98cb0fd160c89ef/src/Shared/EditorLayer/RenderInfo.swift#L122

This won't work with nodes however.

mtzfederico commented 5 months ago

I am trying to get it to build, but I can't get the dependencies installed. Xcode shows KissXML and FastCodable as corrupted. I was not able to find a source for FastCodable and were not able to get KissXML fixed. How do you install them?

bryceco commented 5 months ago

FastCodable is my own thing: https://github.com/bryceco/FastCodable

Not sure about the corruption thing you're seeing. You get that when you use File > Packages > Resolve Package Versions?

mtzfederico commented 5 months ago

I got it working. I renamed the file GoMap/src/iOS/Go\ Map\!\!.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved to ignore.Package-resolved and Xcode automatically fetched the dependencies. I left it as is, but I guess it could be deleted.

I tried 4 different combinations. I prefer the third one since it is more obvious and the border doesn't look weird when it is next to other ways, but the first or the fourth one are not bad options. What do you think?

1) renderInfo.lineColor = .red

IMG_0627

2) renderInfo.lineColor = .purple renderInfo.areaColor = .blue

IMG_0628

3) renderInfo.areaColor = .blue

IMG_0629

4) renderInfo.lineColor = .purple

IMG_0630

bryceco commented 5 months ago

If we decided to incorporate something like this (and I'm far from convinced it's something people want in general) then it should work equally well for areas, ways and nodes. And it would be nice if it didn't hide what type of feature it is (e.g. sidewalk vs path), which means it should probably be a treatment on the casing.

mtzfederico commented 5 months ago

I agree with you. I am not sure what the best way to do this is. For ways, I'm thinking that some sort of pattern such as stripes where every other one is a lighter shade of the features color could work, but I don't have any ideas for ways and nodes. If a good amount of people are not interested in this, then it is probably not the most important thing to focus on.

bryceco commented 4 months ago

Nobody has jumped in to support this idea, so I'm closing for lack of interest. Sorry!