I was wondering if it is possible to find a specific place using the google places api. I know the name of the place, the address or website url, and the coordinates.

I need this to get the ratings this place has.

Is this possible? If not, is it going to be?

有帮助吗?

解决方案

I think your best bet would be to do a nearbysearch with the location (lat,long), a small radius, and the name and types parameters to narrow it down. If you are targeting a specific place, then you can just manually find it in the results and use its reference for a Details request in your solution.

If the target place can be dynamic, for example based on user input, then you might want to show the user the list of results and let them choose the correct one. I don't think there's a way to guarantee that you will always get exactly the result you're looking for as, say, the first result in the list. Experiment with different types of requests and parameters and try to get a sense for the behaviour of the responses to find what will work best for your solution.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top