func getLocationAddress() {
let centerCoordinate = CLLocationCoordinate2D(latitude: -34.005676, longitude: 138.795836)//mapView.centerCoordinate
addressAutofill.suggestions(for: centerCoordinate) { [weak self] result in
guard let self = self else { return }
switch result {
case .success(let suggestions):
if let first = suggestions.first {
self.addressAutofill.select(suggestion: first) { [weak self] result in
guard let self = self else { return }
if case .success = result {
} else {
}
}
}
case .failure(let error):
print("error = (error)")
}
}
}
error = generic(code: 422, domain: "MapboxCoreSearchErrorDomain", message: "Type "countryregionpostcodedistrictplacelocalityneighborhoodaddressstreetpoi" is not a known type. Must be one of: country, region, place, district, locality, postcode, neighborhood, address, poi, poi.landmark")
mapbox-search-ios version: 1.0.0-rc.4
try:
1、The official demo has the same problem
2、‘options’ 、‘countries’ 、‘language’ has the same problem