我已经在我的应用程序中实现了Google自动完成功能。我希望确保这些自动完成仅适用于位置、行政区域和国家,而不是道路或其他任何地方。我们能做到吗?
typedef NS_ENUM(NSInteger, GMSPlacesAutocompleteTypeFilter) {
/**
* All results.
*/
kGMSPlacesAutocompleteTypeFilterNoFilter,
/**
* Geeocoding results, as opposed to business results.
*/
kGMSPlacesAutocompleteTypeFilterGeocode,
/**
* Geocoding results with a precise address.
*/
kGMSPlacesAutocompleteTypeFilterAddress,
/**
* Business results.
*/
kGMSPlacesAutocompleteTypeFilterEstablishment,
/**
* Results that match the following types:
* "locality",
* "sublocality"
* "postal_code",
* "country",
* "administrative_area_level_1",
* "administrative_area_level_2"
*/
kGMSPlacesAutocompleteTypeFilterRegion,
/**
* Results that match the following types:
* "locality",
* "administrative_area_level_3"
*/
kGMSPlacesAutocompleteTypeFilterCity,
};
这可以通过编辑此标题文件来实现,对吗?但是我尝试删除其中一些内容,但仍然起着相同的作用。