GooglePlaces Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
GMSPlaceSearchNearbyRankPreference
enum GMSPlaceSearchNearbyRankPreference : NSInteger {}
How results will be ranked in the response.
-
(default) Sorts results based on their popularity.
Declaration
Swift
case popularity = 0
Objective-C
GMSPlaceSearchNearbyRankPreferencePopularity
-
Sorts results in ascending order by their distance from the specified location.
Declaration
Objective-C
GMSPlaceSearchNearbyRankPreferenceDistance
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-27 UTC.
[null,null,["Last updated 2025-08-27 UTC."],[[["\u003cp\u003e\u003ccode\u003eGMSPlaceSearchNearbyRankPreference\u003c/code\u003e is an enum used to specify how results will be ranked in a Place Search.\u003c/p\u003e\n"],["\u003cp\u003eIt has two possible values: \u003ccode\u003epopularity\u003c/code\u003e (default), which sorts results by their popularity, and \u003ccode\u003edistance\u003c/code\u003e, which sorts results by their distance from the specified location.\u003c/p\u003e\n"]]],["The `GMSPlaceSearchNearbyRankPreference` enum defines how search results are ranked. `GMSPlaceSearchNearbyRankPreferencePopularity` (default) ranks results by popularity. `GMSPlaceSearchNearbyRankPreferenceDistance` ranks results by distance from a location in ascending order. Both can be declared in Swift and Objective-C. The enum provides two options for sorting nearby place search results, either by popularity or by distance.\n"],null,["# GooglePlaces Framework Reference\n\nGMSPlaceSearchNearbyRankPreference\n==================================\n\n enum GMSPlaceSearchNearbyRankPreference : NSInteger {}\n\nHow results will be ranked in the response.\n- `\n ``\n ``\n `\n\n ### [GMSPlaceSearchNearbyRankPreferencePopularity](#/c:@E@GMSPlaceSearchNearbyRankPreference@GMSPlaceSearchNearbyRankPreferencePopularity)\n\n `\n ` \n (default) Sorts results based on their popularity. \n\n #### Declaration\n\n Swift \n\n case popularity = 0\n\n Objective-C \n\n GMSPlaceSearchNearbyRankPreferencePopularity\n\n- `\n ``\n ``\n `\n\n ### [GMSPlaceSearchNearbyRankPreferenceDistance](#/c:@E@GMSPlaceSearchNearbyRankPreference@GMSPlaceSearchNearbyRankPreferenceDistance)\n\n `\n ` \n Sorts results in ascending order by their distance from the specified location. \n\n #### Declaration\n\n Swift \n\n case distance = 1\n\n Objective-C \n\n GMSPlaceSearchNearbyRankPreferenceDistance"]]