I am using the official Google Documentation to create the Address lookup.
In the Android version I am able to bias the result to my area.
For example typing in "123 Main St" shows the Main st in my town first before showing me other results.
In iOS I can't figure out how to do that. I am using the "Add a Full-Screen Control" with the the GMSAutocompleteViewController
delegate.
There is a GMSCoordinateBounds
but the example is for a map. I am not using a map.
I have tinkered around with something like this but can't get it to work. Am I even on the right track?
- (void) placeAutocomplete : (NSString*) location : Bounds:(GMSCoordinateBounds *)bounds{
[_placesClient autocompleteQuery:location
bounds:bounds
filter:filter
callback:^(NSArray *results, NSError *error) {
if (error != nil) {
NSLog(@"Autocomplete error %@", [error localizedDescription]);
return;
}
for (GMSAutocompletePrediction* result in results) {
NSLog(@"Result '%@' with placeID %@", result.attributedFullText.string, result.placeID);
}
}];
}
Any help?