-1
バングラデシュなど、特定の国のGoogleAutocomplete検索APIを既に制限しています。今私はバングラデシュの都市であるダッカ市のためにそれを制限したいと思います。私のコードはObjective Cの特定の都市のGoogleAutocomplete検索APIを制限する
APICommunicator *api = [[APICommunicator alloc] init];
_searchTermArray=[[NSMutableArray alloc]init];
NSDictionary *arr = [api getGoogleAPIArrByPOST:[NSString stringWithFormat:@"https://maps.googleapis.com/maps/api/place/autocomplete/json?input=%@®ion=BD&components=country:BD&types=geocode&key=%@",searchTerms,API_KEY]parameter:nil];
NSString *areaName;
for (areaName in arr) {
_searchTermArray=[[arr valueForKey:@"predictions"]valueForKey:@"description"];
}
私はこのdocumentationから都市