According to the
Local Search Documentation:
QUOTE
Using a query of "*" returns all values that match other criteria in the search (category, radius, and so on).
This works fine if I provide a location, but if I perform a query based on
latitude and longitude no results are returned:
Local Search API:
query=*&longitude=-122.900614&latitude=47.038755 (requires an App ID to test)
YQL Console:
select * from local.search(0,20) where query="*" and longitude="-122.900614" and latitude="47.038755"This behavior is unexpected, undesirable, and undocumented.
Adding a
radius has no effect:
YQL Console:
select * from local.search(0,20) where query="*" and longitude="-122.900614" and latitude="47.038755" and radius="2"Changing the query from the "*" wildcard to something specific, like
"food" causes it to work correctly:
YQL Console:
select * from local.search(0,20) where query="food" and longitude="-122.900614" and latitude="47.038755"Changing the query to use a
location, like "Olympia, WA" causes it to work correctly, even with the "*" wildcard:
YQL Console:
select * from local.search(0,20) where query="*" and location="Olympia, WA"This last query that uses a location might provide a work-around for me, but it is not preferable. I would like to be able to return a list of businesses near the center of a Yahoo! map in the same way that
Yahoo! Local does. I could reverse geocode the latitude and longitude, and then pass that in as a location, but that seems incredibly wasteful and silly.
To give some background: I am working on a prototype of a public application that is meant to help people with disabilities to find work in the State of Washington. We hope to be able to show a list of businesses that are near a person's home. Being able to show all business, without providing a specific category or search term, is a business requirement.
I have already implemented a prototype using Google's services but the Yahoo! services, in particular YQL, seem more flexible for achieving our goals.
Thank you for your time!
-Josh