質問

I am using the Google places api and it is working fine. I want to show the nearby places, for that I have given type as a restaurant in api url:

https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=12.916263577001692,77.65223027601557&radius=1500&types=restaurant&sensor=true&key=MYWORKINGKEY

The situation arises where I can't make a call to api for each type. Is there any common keyword to get nearby places?

役に立ちましたか?

解決

In google places api the "types" is an optional parameter. if u set the type it restricts the results to Places matching to that type only.

just remove the type parameter and see the result.

https://maps.googleapis.com/maps/api/place/nearbysearch/json
location=12.916263577001692,77.65223027601557&radius=1500&sensor=true&key=MYWORKINGKEY
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top