Google Places Api rankby=距离不起作用 [英] Google Places Api rankby=distance not working
本文介绍了Google Places Api rankby=距离不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用Google Places API只获取离我位置最近的一些地方,但一些结果根本没有显示(例如,tbilisimarriot和Courtyardby marriot结果),而且列表也不能正确显示从最近到最长的位置。我的请求URL是:
https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=41.711586,44.748187&rankby=distance&keyword=(tbilisimarriot)OR(courtyardbymarriot)OR(ambassadori)OR(mercure)OR(ibishotel)OR(holidayinn)OR(cityavenue)OR(hotelcitycenter)OR(museumhotel)OR(hotelastoria)OR(citadelnarikala)OR(iotahotel)OR(preferencehualing)&key=***
我是否错误地使用了url?有什么问题吗?谢谢!
推荐答案
rankby
-指定结果的列出顺序。请注意,如果指定了radius
(在上面的必需参数中描述),则不能包括rankby
。
如果指定了rankby=distance
(在下面的可选参数中描述),则需要keyword
、name
或type
中的一个或多个。
https://stackoverflow.com/a/50817579/8646587
这篇关于Google Places Api rankby=距离不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文