Search code examples
androidgoogle-mapsgoogle-geocoder

Geocoding results without displaying them on a map


I am devoloping an app that let the user know its location. I am using this example

But I also seen here that "The Geocoding API may only be used in conjunction with a Google map; geocoding results without displaying them on a map is prohibited". So I cannot use Geocoder without displaying the result on the map?


Solution

  • Geocoder, the class that you use which, for Android is under the package:android.location.Geocoder.

    That is different from Google Geocoding API:
    https://developers.google.com/maps/documentation/geocoding/?hl=fr
    for which we'd use the url:
    http://maps.googleapis.com/maps/api/geocode/output?parameters

    There is a GeoCoder class for javascript which is related to the Google Geocoding API which is the Geocoder class of the Google Maps API v3. (searching for which takes us to: https://developers.google.com/maps/documentation/javascript/services?hl=fr#Geocoding)

    So when there is reference to "The Geocoding API may only be used in conjunction with a Google map; geocoding results without displaying them on a map is prohibited."

    It would be for the API and related class of the v3 API, not the android.location.Geocoder.

    Also, i would like you to know about:
    https://code.google.com/p/android/issues/detail?id=8816

    I have faced that one.