Android user positioning (III)

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.