Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The Geocode API is rather simple, to get lat/lon from the api you only need to 3 params: output, sensor and address.</p> <p>output the output format you want, json or xml (IIRC)</p> <p>sensor should be a boolean indicating weather or not the value comes from a sensor such as a GPS chip.</p> <p>address should be the address (don't forget to url encode it) you wish to geocode.</p> <p>This is an example, where I geocode my office address, and get JSON in response: <a href="http://maps.googleapis.com/maps/api/geocode/json?sensor=false&amp;address=1+Maritime+Plaza+San+Francisco+CA" rel="nofollow">http://maps.googleapis.com/maps/api/geocode/json?sensor=false&amp;address=1+Maritime+Plaza+San+Francisco+CA</a></p> <p>If you navigate to that you should see something like:</p> <pre><code>{ "status": "OK", "results": [ { "types": [ "street_address" ], "formatted_address": "1 Maritime Plaza, San Francisco, CA 94111, USA", "address_components": [ { "long_name": "1", "short_name": "1", "types": [ "street_number" ] }, { "long_name": "Maritime Plaza", "short_name": "Maritime Plaza", "types": [ "route" ] }, { "long_name": "San Francisco", "short_name": "San Francisco", "types": [ "locality", "political" ] }, { "long_name": "San Francisco", "short_name": "San Francisco", "types": [ "administrative_area_level_3", "political" ] }, { "long_name": "San Francisco", "short_name": "San Francisco", "types": [ "administrative_area_level_2", "political" ] }, { "long_name": "California", "short_name": "CA", "types": [ "administrative_area_level_1", "political" ] }, { "long_name": "United States", "short_name": "US", "types": [ "country", "political" ] }, { "long_name": "94111", "short_name": "94111", "types": [ "postal_code" ] } ], "geometry": { "location": { "lat": 37.7953907, "lng": -122.3991803 }, "location_type": "ROOFTOP", "viewport": { "southwest": { "lat": 37.7922431, "lng": -122.4023279 }, "northeast": { "lat": 37.7985383, "lng": -122.3960327 } } } } ] } </code></pre> <p>If you take the lat/lon provided and place it on a <a href="http://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=37.7953907,+-122.3991803&amp;aq=&amp;sll=37.0625,-95.677068&amp;sspn=67.42243,128.847656&amp;ie=UTF8&amp;t=h&amp;z=17" rel="nofollow">map</a> you see a pointer on my office building.</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.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      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