6
votes

Geocoder getFromLocationName is not returning anything if I'm searching for business places. Here are my finding so far:

  • grocery places, commercial buildings -> no result
  • schools -> finding results, but only returning Latitude and Longitude. I have to do reverse geocoding in order to get the address based on the coordinates, but the address wouldn't be accurate.
  • complete address -> same as school, only returning Latitude and Longitude
  • hospital and pharmacy -> returning Latitude and Longitude

I've tested this on 1.6, 2.1 and 2.2 devices that has Google Maps.

I'm trying to find if there's a limitation explained somewhere on the SDK, but there is none except:

The amount of detail in a reverse geocoded location description may vary, for example one might contain the full street address of the closest building, while another might contain only a city name and postal code. The Geocoder class requires a backend service that is not included in the core android framework. The Geocoder query methods will return an empty list if there no backend service in the platform (http://developer.android.com/reference/android/location/Geocoder.html)

[update] So after nights of research, I can't seems to make it work - Google simply wont give me the result. Some discussion on android-developers points a fact that getFromBusinessName was omitted when Google Navigation came out. So I'm starting to assume that Google is pulling back some of their geocoding service.

I can always create a webpage that use Google Geocoder API, but its limited to 2500 api call - and I dont think it will be legal (lol). So what are my alternatives here?

3
Did you find any answer ? Or something to get around this problem ? I tried to find a webservice or something like that, but something free for business search is not so easy to find. Moreover, SOAP is a real shit to use on Android, even with Ksaop. Look what I found in my logCat : For the business search, I have this error : LocationMasfClient forwardGeocode(): no feature in GLocation. But for exact search, when I ask for my address, this error is not present ! - user398668
Yeah, schools, public non-business/non commercial buildings are generally there. However, its only returning the latitude/longitude, not the address. So if I search for my address, it will return a coordinate. If I reverse-geocode that coordinate - I will get different address. This is just so wrong... No alternative yet, I'm starting to look simplegeo.com though. Let me know your finding! - LawrenceGS
I heve the same problem even though I am NOT looking for a business address, but a general specific street address. - Yar

3 Answers

1
votes

I've hit the same problem. I'm finding that the geocoding API often returns no results if I include the business/venue name, but by missing it off, the lat/long can be much less accurate.

I've implemented a pragmatic solution: 1. Call the API with a string including the business/venue name 2. If it fails, call it a second time without the business/venue name, just the address

I've yet to see a case where no location is returned, so it seems a decent compromise as it means I do at least get location data, if sometimes less accurate, and the cost of a second API call is mitigated with threaded calls.

1
votes

I couldn't find the button to reply but, like you all, I have just run into the same problem. I haven't tried it yet but it sounds pretty solid. A potential workaround is located here:

Using Google Maps API to get Address of Business

Happy coding :)

Edit: Forget that link and check this one out: http://code.google.com/apis/maps/documentation/places/

0
votes

Try this approach:

1) Use Geocoder to convert latitude-longitude to address
2) Make an API call to Whitepages (or similar service), specifically the reverse_address method which will get you business name for the address mentioned.