---restore content starts---
Basic Android itself with the Geocoder this class can also be achieved for the latitude and longitude of the positive and negative Yi, but its own bugs exist a lot, especially in the stability of the resolution here, Google provides geocoding stability more good, although its usage is a little more complex, In fact, its general working principle is the HTTP protocol, Google has an open interface, we will be the latitude and longitude as a parameter to the Google server, and then it will parse the good data back to us
Its interface format is as follows:
Http://maps.googleapis.com/maps/api/geocode/json?latlng=40.90,-74.9&sensor=true_or_false
From HTTP to geocode/are fixed addresses, and the back of the JSON represents the returned data format, XML is also OK, and then clear, you want to parse the latitude and longitude value is what you
Fill in what is, the back is to determine whether the request from the device's sersor, generally set to false on it
Well, we'll get this JSON-formatted data:
"Formatted_address": "277,"
The parsing of JSON data is simple, but if Google is blocked, there is no way, the recent attempt to find that Google Server has been connected, can only continue to wait a few days to try a better
The code for the test is as follows:
---restore content ends---
Using geocoding to do the Yi of latitude and longitude