79673603

Date: 2025-06-20 15:01:20
Score: 0.5
Natty:
Report link

You're trying to access coordinate but it does not exist in the data returned by PlaceAutoComplete.suggestions(). This happens because the Search SDK for iOS is using the Search Box API behind the scenes, which is a two-step search process. The first step gets suggestions, the second "retrieves" full details about a suggestion after the user selects one. The first call to get suggestions does not include coordinates. You can learn more about the data actually returned by these API calls using the Search Box API playground: https://docs.mapbox.com/playground/search-box/suggest-retrieve/.

You need to call PlaceAutoComplete.select(suggestion: selectedSuggestion) as outlined in step 4 on this guide: https://docs.mapbox.com/ios/search/guides/search-by-text/

That response will include the coordinates data you're looking for.

Reasons:
  • Blacklisted phrase (1): this guide
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: chriswhong