Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I went through the documentation and as you have rightly pointed out you do not need a business account to use the Geocoding API. If you have a non business account then you only need to pass the API key. Client ID is required only if you have a business account. The key itself is unique as mentioned below :</p> <p><a href="https://developers.google.com/console/help/#WhatIsKey" rel="nofollow">https://developers.google.com/console/help/#WhatIsKey</a></p> <blockquote> <p>An API key is a unique key that you generate using the Console. When your application needs to call an API that's enabled in this project, the application passes this key into all API requests as a key=API_key parameter. Use of this key does not require any user action or consent, does not grant access to any account information, and is not used for authorization.</p> </blockquote> <p>According to the link below the Client ID is used instead of key in the case of Business Accounts.</p> <p><a href="https://developers.google.com/maps/articles/v2tov3#newkey" rel="nofollow">https://developers.google.com/maps/articles/v2tov3#newkey</a></p> <blockquote> <p>If you are a Maps for Business customer, you will need to use a Client ID in place of a Key. Note that the two cannot be used together. Client IDs are similar to keys, but with the following differences:</p> <ul> <li><p>Maps for Business applications using a Client ID may have access to additional features or limits, such as Maps Analytics.Your Client ID will be given to you by Google Enterprise Support. You do not need to use the API Console.</p></li> <li><p>When loading the Google Maps JavaScript API, you will use the client parameter instead of the key parameter.</p></li> </ul> </blockquote> <p>I'm guessing the same principle applies to the Geocoding API. If you want the additional feature that are not part of non business account you will have to get a Business Account. </p> <p>I ran the following code using only the key to sign my request in Java and it works perfectly. </p> <pre><code> public static String getAddress(String latitude, String longitude){ String address = null; try { final String inputurl = "http://maps.googleapis.com/maps/api/geocode/xml?latlng="+ latitude + "," + longitude + "&amp;sensor=true"; // Sign the URL using key String url = getRequestURL(inputurl); url = "http://maps.googleapis.com" + url; final URL google = new URL(inputurl); final URLConnection geocode = google.openConnection(); final BufferedReader in = new BufferedReader(new InputStreamReader( geocode.getInputStream())); String inputLine; while ((inputLine = in.readLine()) != null) { address += inputLine; } in.close(); } catch (Exception e) { // TODO: handle exception e.printStackTrace(); } return null; } public static String getRequestURL(final String inputurl) throws IOException, InvalidKeyException, NoSuchAlgorithmException, URISyntaxException { // Convert the string to a URL so we can parse it final URL url = new URL(inputurl); final URLSigner signer = new URLSigner("*INSERT YOUR KEY HERE*"); final String request = signer.signRequest(url.getPath(), url.getQuery()); return request; } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload