Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
689 views
in Technique[技术] by (71.8m points)

android - Search all places in given city name

Right now i am using Google Places API for fetching Restaurant list in particular city, query like

https://maps.googleapis.com/maps/api/place/textsearch/xml?query=restaurants+in+Sydney&sensor=true&key=AddYourOwnKeyHere

But the problem here is that we can only have 20 result and with help of next_page_token in the response we can again fetch 20 more, by this we can only have 60 result.

Mention on Google Places API page

The maximum number of results that can be returned is 60

So is there any other authentic way to fetch all the Restaurant details.

Just for information : I am implementing this in android application.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Searches are performed by looking within a radius of a given set of coordinates (you can't search just by city name). The maximum search radius is 50km. If there's more than 60 results in that area, you could reduce your search radius, then split up the query into multiple calls. I'm not sure if it would be appropriate to have the user fetch that much data on a mobile device all at once, though.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...