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

前端 未结 5 1400
后悔当初
后悔当初 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条回答
  •  猫巷女王i
    2020-12-16 01:10

    You can get the country specific results with the Google autocomplete place api iOS SDK. Just go to this link

    let filter = GMSAutocompleteFilter()
    filter.type = .Establishment
    filter.country = "UK"
    

    set the filter country to what ever the country code you want. This will then fetch only country specific results for you.

    You can obtain the country codes from this link

    Hope this helps.

提交回复
热议问题