Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

A good google.maps geolocation api? [closed]

Is there a google maps api that will allow you to pass in a location name and it will return coordinates that point to the location on googlemaps?

like image 501
Ctak Avatar asked Dec 21 '25 06:12

Ctak


1 Answers

Here is the The Google Geocoding API

Here is a example request:

http://maps.googleapis.com/maps/api/geocode/xml?address=Berlin&sensor=false

You can filter the result: for geometry/location/lat and lng

<GeocodeResponse>
  <status>OK</status>
    <result>
    <type>locality</type>
    <type>political</type>
    <formatted_address>Berlin, Deutschland</formatted_address>
    […]
    <geometry>
      <location>
        <lat>52.5234051</lat>
        <lng>13.4113999</lng>
      </location>
      <location_type>APPROXIMATE</location_type>
      <viewport>[…]</viewport>
      <bounds>[…]</bounds>
    </geometry>
  </result>
</GeocodeResponse>
like image 154
timaschew Avatar answered Dec 23 '25 19:12

timaschew