Google's geocoding service features:
1. query the longitude and latitude of an address
2. query the specific address of a longitude and latitude
Android geocoding alternatives
// Query the URL and its explanation based on the address
Http://maps.googleapis.com/maps/api/geocode/json? Address = SFO & sensor = false --- JSON indicates the data type returned. You can change it to XML. Address is the input location. The sensor identifies whether the request comes from a device's sensor. Language indicates the language of the query result.
// Query the URL at the longitude and latitude Based on the address and its explanation. The difference is that there is a range between regions.
Http://maps.googleapis.com/maps/api/geocode/json? Address = SFO & bounds = 34.17,-188.6045 | 34.236,-118.500996 & sensor = false --- bounds is a range. The sensor identifies whether the request comes from a device's sensor. Language indicates the language of the query result.
// Query the URL and its explanation based on the address. For example, the countryCode
Http://maps.googleapis.com/maps/api/geocode/json? Address = SFO & sensor = false & region = es --- region is a country code. The sensor identifies whether the request comes from a device's sensor. Language indicates the language of the query result.
// Query the URL and its explanation based on the latitude and longitude
Http://maps.googleapis.com/maps/api/geocode/json? Latlng = 40.714224,-73.961452 & sensor = false --- latlng = 40.714224,-73.961452 latitude and longitude data. The sensor identifies whether the request comes from a device's sensor. Language indicates the language of the query result.
After that, you can use the HTTP protocol to obtain the data on the web page, and then obtain the data you need based on the returned data type in XML or JSON. xml and JSON will be introduced in the next section.