-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Detail Bug Report
Summary
- Context:
AddressCategoryis an enum used to filter search and autocomplete results by geographical boundaries (e.g., inincludeAddressCategoriesandexcludeAddressCategoriesparameters). - Bug: The
apiValueforPOSTAL_CODEis set to"PostalCode", but the Apple Maps Server API expects"PostCode". - Actual vs. expected:
AddressCategory.POSTAL_CODE.apiValue()returns"PostalCode", while the Apple Maps Server API documentation specifies"PostCode"as the valid value for this category. - Impact: Requests that attempt to include or exclude postal codes using this enum will fail to filter correctly, as the Apple Maps Server API will likely ignore the unrecognized
"PostalCode"value or return an error.
Code with bug
/**
* Postal code address component.
*/
POSTAL_CODE("PostalCode"); // <-- BUG 🔴 Should be "PostCode" to match Apple Maps Server APIDocumentation
The Apple Maps Server API (search and autocomplete) lists valid values for includeAddressCategories and excludeAddressCategories as: AdministrativeArea, Country, Locality, PostCode, SubAdministrativeArea, and SubLocality. Our enum returns PostalCode, which is not recognized by the API.
Recommended fix
Update the apiValue for POSTAL_CODE to "PostCode".
/**
* Postal code address component.
*/
POSTAL_CODE("PostCode"); // <-- FIX 🟢Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working