Mahboob Nur
Mahboob Nur

Reputation: 787

Limit Google Autocomplete Place Search API for specific country using objective-c

I am trying to limit Google Autocomplete Place Search API for specific country for example Bangladesh using objective-c. Here is my code

 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=%@&region=BD@&types=geocode&key=%@",searchTerms,API_KEY]  parameter:nil];
            NSString *areaName;
            for (areaName in arr) {
                _searchTermArray=[[arr valueForKey:@"predictions"]valueForKey:@"description"];



            }

          //  _searchTermArray=[[NSMutableArray alloc]initWithArray:arr];
            NSLog(@"%@",[_searchTermArray description]);

But unable to limit it by country. I will be grateful if anyone help me with a solution. Thanks.

Upvotes: 0

Views: 534

Answers (1)

Related Questions