Reputation: 77
The 4SQ API does not accept all-zero values (like 0, 0.0, 0.00) for latitude or longitude when searching for venues (intent "browse", southwest and northeast provided). I always receive the following error:
Invalid geo coordinates
Is this is a bug or intended behaviour? Do zero values have some special meaning so they cannot be used as lat/long parameters?
Upvotes: 0
Views: 434
Reputation: 1944
This is intended behavior -- we added this feature because the overwhelming majority of requests to (0,0) are due to some programming mistake, that we think the developer would like to know about. So, instead of silently returning no and/or bogus results, we return an error to help developers debug.
Fortunately, 0,0 is out over the ocean without much going on around there. You can always try 0.01,-0.01 if you want to make a request about that part of the world...
Upvotes: 4
Reputation: 28144
David Schwartz said something about it on this post : Invalid Geo Coordinates
Likely because it uses a parser that internally returns zero to indicate an invalid entry. So it rejects a perfectly-valid zero
Maybe you should think about it.
Upvotes: 1