Note that there are some explanatory texts on larger screens.

plurals
  1. POHow do I use Google Places API for a desktop app?
    primarykey
    data
    text
    <p>I have some data (establishment names with GPS coordinates) that I would like to pass to Google Places in order for it to return me the type of establishment (e.g., restaurant, bar, etc ...). I am completely new to any sort of web http request type things. The documentation <a href="http://code.google.com/apis/maps/documentation/places/" rel="nofollow">here</a> makes perfect sense. I just don't know how to automate this inside a Java desktop app and I can't find any place to download a Java API for Google places.</p> <p>I thought I could just write some Java code to make the requests myself but I can't seem to get the response back from the server. For example, I tried this using Google's example (except I changed the API key to my own):</p> <pre><code>URL google = new URL("https://maps.googleapis.com/maps/api/place/search/json?location=-33.8670522,151.1957362&amp;radius=500&amp;types=food&amp;name=harbour&amp;sensor=false&amp;key=AIzaSyAiFpFd85eMtfbvmVNEYuNds5TEF9FjIPI); HttpURLConnection connection = (HttpURLConnection) google.openConnection(); connection.setDoOutput(true); DataInputStream in = new DataInputStream(connection.getInputStream()); //then try to read in the response </code></pre> <p>The program always stalls at connection.getInputStream(). Can someone tell me what I am doing wrong? Also, is there someplace where I can download the Google Places API as a jar file? Or, is there a better piece of software I should use for this type of categorization? Thanks!</p>
    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. 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