Ios 无法筛选google地图
我试图将google places auto complete限制在印度,但无法进行筛选,请有人提供帮助。Ios 无法筛选google地图,ios,objective-c,google-maps,sdk,Ios,Objective C,Google Maps,Sdk,我试图将google places auto complete限制在印度,但无法进行筛选,请有人提供帮助。 我的谷歌地图框架, #进口 GMS_ASSUME_NONNULL_BEGIN /** * The type filters that may be applied to an autocomplete request to restrict results to different * types. */
我的谷歌地图框架, #进口
GMS_ASSUME_NONNULL_BEGIN
/**
* The type filters that may be applied to an autocomplete request to restrict results to different
* types.
*/
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,
};
/**
* This class represents a set of restrictions that may be applied to autocomplete requests. This
* allows customization of autocomplete suggestions to only those places that are of interest.
*/
@interface GMSAutocompleteFilter : NSObject
/**
* The type filter applied to an autocomplete request to restrict results to different types.
* Default value is kGMSPlacesAutocompleteTypeFilterNoFilter.
*/
@property(nonatomic, assign) GMSPlacesAutocompleteTypeFilter type;
/**
* The country to restrict results to. This should be a ISO 3166-1 Alpha-2 country code (case
* insensitive). If nil, no country filtering will take place.
*/
@property(nonatomic, copy) NSString *GMS_NULLABLE_PTR INDIA;
@end
GMS_ASSUME_NONNULL_END
我试图限制谷歌的地方自动完成到印度,但无法过滤,请有人建议帮助 来自文档:
- (NSString* _Nullable) country [read, write, copy]
该国将限制选举结果
这应该是ISO 3166-1 Alpha-2国家代码(不区分大小写)。如果为零,则不会进行国家/地区筛选
对于印度,你应该:
yourFilter.country =@"IN";
这是国家名单