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."],[],["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,[]]