Skip to content

fix: use the documented Geocoding address descriptor parameter - #1069

Open
illuminati1911 wants to merge 1 commit into
mainfrom
fix/geocoding-address-descriptor-parameter
Open

illuminati1911 wants to merge 1 commit into
mainfrom
fix/geocoding-address-descriptor-parameter

Conversation

@illuminati1911

@illuminati1911 illuminati1911 commented Dec 3, 2026 •

Copy link
Copy Markdown

Issue

enableAddressDescriptor(boolean) sends enable_address_descriptor rather than the parameter documented for Geocoding v3. At Google's example location in Delhi, both true and false returned descriptors, so callers couldn't turn them off for that request.

Fix

Keep the existing method signature. Send extra_computations=ADDRESS_DESCRIPTORS when enabled, and remove only ADDRESS_DESCRIPTORS when disabled so other requested computations remain intact.

Verification

All 27 GeocodingApiTest tests and the scoped formatting check passed on JDK 17. Coverage was not collected.

In a live comparison at the same location, the documented request returned five landmarks and three areas when enabled, and no descriptor when disabled. Both calls returned the same 17 geocoding result IDs in the same order.


Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open a GitHub issue as a bug/feature request before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #1068 🦕

This branch has not been deployed

No deployments
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

Successfully merging this pull request may close these issues.

Geocoding: enableAddressDescriptor(false) still returns descriptors

1 participant