Skip to content

Honor clickable for Markers in Google Maps#7318

Open
seadowg wants to merge 4 commits into
getodk:v2026.3.xfrom
seadowg:fix-point-click
Open

Honor clickable for Markers in Google Maps#7318
seadowg wants to merge 4 commits into
getodk:v2026.3.xfrom
seadowg:fix-point-click

Conversation

@seadowg

@seadowg seadowg commented Jul 20, 2026

Copy link
Copy Markdown
Member

Closes #7313

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

Google Maps doesn't offer a way to make markers non-clickable so we need to determine whether we should call the feature listener or the map click listener when a marker click occurs here. That does mean that trying to add a point or a line/shape vertex by clicking on a marker will always add the new feature at exactly the same location: that could be considered feature.

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?

Should just fix the issue! As mentioned above, clicking on a marker will always count as a click on the exact point of the marker which means that new features being added via clicks will snap to it.

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

@seadowg
seadowg changed the base branch from master to v2026.3.x July 20, 2026 12:50
@seadowg
seadowg marked this pull request as ready for review July 20, 2026 13:11
@seadowg
seadowg requested a review from grzesiek2010 July 20, 2026 13:11
@seadowg seadowg added the high priority Should be looked at before other PRs/issues label Jul 20, 2026
marker.setIcon(getBitmapDescriptor(context, markerIconDescription));
}

public boolean isClickable() {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be private.

@seadowg seadowg Jul 21, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I'd prefer to leave it private like the other methods on this class. The outer class can access it because Java (if it was Kotlin we'd have a file private class instead), but it makes more sense to have the inner class be private to the outer class and then have the methods used by things outside the inner class be public.

Comment thread google-maps/src/main/java/org/odk/collect/googlemaps/GoogleMapFragment.java Outdated
Comment thread google-maps/src/main/java/org/odk/collect/googlemaps/GoogleMapFragment.java Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

high priority Should be looked at before other PRs/issues needs testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Impossible to place a point over a point from reference geometry in Google Maps

2 participants