Skip to content

Remove duplicate map points when zooming to them#6934

Merged
seadowg merged 2 commits intogetodk:v2025.3.xfrom
grzesiek2010:COLLECT-6921
Oct 21, 2025
Merged

Remove duplicate map points when zooming to them#6934
seadowg merged 2 commits intogetodk:v2025.3.xfrom
grzesiek2010:COLLECT-6921

Conversation

@grzesiek2010
Copy link
Member

@grzesiek2010 grzesiek2010 commented Oct 15, 2025

Closes #6921

Why is this the best possible solution? Were any other approaches considered?

It looks like the problem is in OSM, not in our code. OSM is no longer maintained, so there’s no chance of getting a fix. That’s why I decided to handle it by removing duplicates, which are actually redundant in this case.

How does this change affect users? Describe intentional changes to behavior and behavior that could have accidentally been affected by code changes. In other words, what are the regression risks?

We need to verify that zooming to points (in all map engines) works without regression. Nothing else should be affected.

Do we need any specific form for testing your changes? If so, please attach one.

The form mentioned in the issue.

Does this change require updates to documentation? If so, please file an issue here and include the link below.

No.

Before submitting this PR, please make sure you have:

  • added or modified tests for any new or changed behavior
  • run ./gradlew connectedAndroidTest (or ./gradlew testLab) and confirmed all checks still pass
  • added a comment above any new strings describing it for translators
  • added any new strings with date formatting to DateFormatsTest
  • verified that any code or assets from external sources are properly credited in comments and/or in the about file.
  • verified that any new UI elements use theme colors. UI Components Style guidelines

@grzesiek2010 grzesiek2010 marked this pull request as ready for review October 15, 2025 19:42
@grzesiek2010 grzesiek2010 requested a review from seadowg October 15, 2025 19:42
@grzesiek2010
Copy link
Member Author

@seadowg should this go to a point release? As I remember, it was placed above v2025.4 in the project board but I wanted to double-check

@dbemke
Copy link

dbemke commented Oct 17, 2025

Could you send us the apk?

@grzesiek2010
Copy link
Member Author

@dbemke
Copy link

dbemke commented Oct 20, 2025

Now if there are 2 points which are exactly the same in OSM in the map view you can see "Choices:2 (2 shown on map)" and at the same time you can see (and tap) only one point (one point exists in the map) - is it expected?

@seadowg
Copy link
Member

seadowg commented Oct 20, 2025

Now if there are 2 points which are exactly the same in OSM in the map view you can see "Choices:2 (2 shown on map)" and at the same time you can see (and tap) only one point (one point exists in the map) - is it expected?

This should be the same in all maps right? What was the behaviour in the situation before?

@dbemke
Copy link

dbemke commented Oct 20, 2025

This should be the same in all maps right? What was the behaviour in the situation before?

It works the same as it does in the store version. If there are the same points Google maps allow to tap "again" and it possible to select the other point, while Mapbox and OSM allow tapping/choosing just one of the points (as if the other one doesn't exist).
So just to make sure: Does "removing the duplicate point" mean that the number of "shown on map" changes?

@seadowg
Copy link
Member

seadowg commented Oct 20, 2025

So just to make sure: Does "removing the duplicate point" mean that the number of "shown on map" changes?

Ah I see. No, the number of points should remain the same, I'd just expect that when you click on the point, you always get one and not the other.

@dbemke
Copy link

dbemke commented Oct 21, 2025

Tested with Success!

Verified on a device with Android 10

Verified cases:

@WKobus
Copy link

WKobus commented Oct 21, 2025

Tested with Success!

Verified on a device with Android 16

@seadowg seadowg merged commit f75676f into getodk:v2025.3.x Oct 21, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants