0

Looking at the documentation here for Googleway's google_places function, I see that there is an option to set the rankby parameter to "location". However this isn't an option in the actual Google Places API, and when I tried using it I got no results. Does anyone know what this does and why it isn't described in the documentation?

Cary Shindell
  • 1,336
  • 8
  • 25
  • 2
    I've updated [`googleway`'s documentation](https://github.com/SymbolixAU/googleway/commit/0e00d8d5a3a164985f0c13bed1ae7b19cc3c9d3f) to reflect the latest Google API docs. – SymbolixAU Jun 28 '18 at 04:30

1 Answers1

1

Location is one of the required parameters but not in rankby. There is a possibility that the documentation that you are looking at is referring to an older version of Places API or it is just a typo. With the current version, you will only be able to use prominence and distance for rankby.

rankby — Specifies the order in which results are listed. Note that rankby must not be included if radius (described under Required parameters above) is specified. Possible values are:

  • prominence (default). This option sorts results based on their importance. Ranking will favor prominent places within the specified area. Prominence can be affected by a place's ranking in Google's index, global popularity, and other factors.

  • distance. This option biases search results in ascending order by their distance from the specified location. When distance is specified, one or more of keyword, name, or type is required.

The correct documentation to look at is Place Search Documentation. Please always use the official documentation provided for the API. This will let you stay up to date.

Community
  • 1
  • 1
tomjosef
  • 895
  • 6
  • 21