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

[BUG] MapsSearchClient.getReverseGeocoding() always returns null for MapsSearchAddressCountryRegion.getIso() #44529

Open
lschuer opened this issue Mar 6, 2025 · 2 comments
Assignees
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved. customer-reported Issues that are reported by GitHub users external to the Azure organization. Maps needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team

Comments

@lschuer
Copy link

lschuer commented Mar 6, 2025

Describe the bug
When requesting an address via the method getReverseGeocoding of the MapsSearchClient, the iso value of the country region is always null.

The reason seems to be a wrong field matcher in the MapsSearchAddressCountryRegion.fromJson() method. The response field is named "iso" but the matcher checks for "ISO".

To Reproduce
Steps to reproduce the behavior: (Kotlin)

val result = mapSearchClient.getReverseGeocoding(
    GeoPosition(-122.138681, 47.630358),
    listOf(ReverseGeocodingResultTypeEnum.ADDRESS, ReverseGeocodingResultTypeEnum.COUNTRY_REGION),
    "Auto"
)

val iso = result.features.firstOrNull()?.properties?.address?.countryRegion?.iso

Expected behavior
I'd expect the value to be filled by the iso code.

Screenshots

Debugged fromJson mapping function of MapsSearchAddressCountryRegion:
Image

Query result:
Image

Setup (please complete the following information):

  • OS: Ubuntu 22.04
  • IDE: IntelliJ
  • Library/Libraries: com.azure:azure-maps-search:2.0.0-beta.2
  • Java version: 17
  • App Server/Environment: Tomcat
  • Frameworks: Spring Boot
@github-actions github-actions bot added customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Mar 6, 2025
@alzimmermsft alzimmermsft added Maps bug This issue requires a change to an existing behavior in the product in order to be resolved. and removed question The issue doesn't require a change to the product in order to be resolved. Most issues start as that needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. labels Mar 10, 2025
@github-actions github-actions bot added the needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team label Mar 10, 2025
@alzimmermsft
Copy link
Member

Thanks for filing this issue @lschuer

@dubiety could you look into this? ISO appears to be defined in the Swagger https://github.com/Azure/azure-rest-api-specs/blob/main/specification/maps/data-plane/Search/stable/2023-06-01/search.json#L1029

@dubiety
Copy link
Member

dubiety commented Mar 11, 2025

Hi @lschuer ,

You're right. This is a bug from our side. We'll fix it in our next release. Since the API document should be updated as well, this can take some time. I'll notify you once this is updated and released.

//cc: @alzimmermsft

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved. customer-reported Issues that are reported by GitHub users external to the Azure organization. Maps needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team
Projects
None yet
Development

No branches or pull requests

3 participants