This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)testPlaceSearchByTextRequestGMPSRequestCreationWithProperties { | |
GMSPlaceSearchByTextRequest *request = | |
[[GMSPlaceSearchByTextRequest alloc] initWithTextQuery:@"pizza in New York" placeProperties:@[GMSPlacePropertyName, GMSPlacePropertyPlaceID]]; | |
request.isOpenNow = YES; | |
request.includedType = @"restaurant"; | |
request.maxResultCount = 5; | |
request.minRating = 3.5; | |
request.rankPreference = GMSPlaceSearchByTextRankPreferenceDistance; | |
request.isStrictTypeFiltering = YES; | |
request.priceLevels = @[ @(kGMSPlacesPriceLevelFree), @(kGMSPlacesPriceLevelCheap) ]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func testPlaceSearchByTextRequestGMPSRequestCreationWithProperties() { | |
let placeProperties: [GMSPlaceProperty] = [GMSPlacePropertyName, GMSPlacePropertyPlaceID]; | |
let request = GMSPlaceSearchByTextRequest(textQuery:"pizza in New York" placeProperties:placeProperties) | |
request.isOpenNow = true | |
request.includedType = "restaurant" | |
request.maxResultCount = 5 | |
request.minRating = 3.5 | |
request.rankPreference = .distance | |
request.isStrictTypeFiltering = true | |
request.priceLevels = [GMSPlacesPriceLevel.moderate.rawValue, GMSPlacesPriceLevel.cheap.rawValue] |
OlderNewer