How to get country specific result with Google autocomplete place api ios sdk?

前端 未结 5 1399
后悔当初
后悔当初 2020-12-16 00:36

I\'m using below method to get autocomplete result for input string of GMSPlacesClient class:

- (void)autocompleteQuery:(NSString *)query
               boun         


        
5条回答
  •  盖世英雄少女心
    2020-12-16 01:00

    In your google places API url, just append

     &components=country:sg 
    here sg = country code for singapore. Append country code as per your requirement.
    

    The country must be passed as a two character, ISO 3166-1 Alpha-2 compatible country code. you can refer Country code Of different countries

提交回复
热议问题