Question

I'm trying to implement google places functionality in BlackBerry application. The problem is that google places api respond differently on the same request. For example, this request

https://maps.googleapis.com/maps/api/place/search/json?location=43.6775,-80.7339&radius=500&types=food&sensor=false&key=AIzaSyANf2IAm0cdm5FYFo7_uvMRfCNaVjBI5HE

sometimes returns quite big json array with around 20 places, but sometimes just "status" : "ZERO_RESULTS". What's the reason? I tried to send request from pc browser, the same picture.

Was it helpful?

Solution

Reason is very simple, in the above url you are searching for places in a radius of 500m around given location. Try increasing radius parameter(0~50000).

Also try using many place types.

eg:- &types=food|train_station|other_one|yet_another_one

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top