Map-02. geocode,-02 geocodeMap-02. GeoCoding/ReverseGeoCoding)
The previous section briefly introduces how to obtain user locations and use longitude and latitude to represent locations. This section describes geographical encoding.
First, we need to know what is geocode
Concept:
Geographic code: it refers to the process of establishing the spatial coordinate relationship between statistical data or address
"The geocoder class requires a backend service that is not supported in the core Android framework. The geocoder query methods will return an empty list if there no backend service in the platform."
Here we have mentioned that we need to have a backend service, but we have some suggestions on how to get this service. Some people in the Forum think we should use Google map API.In the following two links, for
Quick query of geographic locationThe Geocoder component provides a quick, geographically-based query that can be queried to display the geographic location of a map by entering an address by adding a query input box. Using Geocoder to move the map display to the specified location area is faster than panning and blooming maps. This feature requires the use of the locator service (location services).Prerequ
. However, most of these services do not have a Python-specific library and are inconsistent with each other's JSON structure. As a geocoder, the disobedient python God made a special geocoding tool to unify the services of these different vendors.
Geocoding Tools Geocoder
First look at which company's GeoCode services it supports:
Installation
Pip Install
Parse maps longitude and latitude using JSON in Android
This error occurs when you use geocoder in googlemaps to reverse the longitude and latitude of a geographical location,"The service is not available" geocoder returns the list as null, and the street information is not obtained. In fact, there has been a bug in the getcoder reversal of latitude and longitude in googlemaps. Google terminated the servic
Preface
This chapter is about android. location. geoCoder, for GPS related chapter, version for Android 4.0 r1, translated from "pandatv 82", welcome to his blog: "http://wisekingokok.cnblogs.com", thanks again "pandatv 82 "! Welcome to join in Android Chinese translation, contact me over140@gmail.com.
Statement
You are welcome to repost, but please keep the original source of the article :)
Blog Garden: http://www.cnblogs.com/
Android Chinese trans
Geographic Encoding and anti-Geographic Encoding of iOS native maps, and Geographic Encoding of ios maps
When we want to implement the function in the App: Enter the place name, encode it as the latitude and longitude, and implement the navigation function. Therefore, I need to use the Geographic Encoding function in the native map, and the Core Location mainly includes the Location and Geographic Encoding (including anti-encoding) functions.
Import in file
# Import
location information, then return a list of address information
View code
// Obtain the address based on the longitude and latitude (country, state, county, street, etc) Private Void Showaddressfromgeopoint (geopoint gpoint) Throws Ioexception {Stringbuilder sb = New Stringbuilder ();Geocoder geocode = New Geocoder (This , Locale. getdefault ()
Address Resolution:
Install
pip install geocoder
Geocode
Import geocoderg = geocoder. google ("1403 Washington Ave, New Orleans, LA 70130") g = geocoder. arcgis (u "10 shangdi10 Street, Haidian district, Beijing") g. latlng
The output is
[29.9287839, -90.08421849999999]
You can also view the complete geojson
g.geojso
You must click an address to directly call Baidu map and display the address on Baidu map. The parameter has only one address and no corresponding coordinates, this reminds me that the previous map was used to transmit a coordinate and display the address on the map. The idea was as follows: how to convert a detailed address to a coordinate, and then it is sent to Baidu map, but it seems that although the detailed address can be converted into coordinates, but this is converted after the display
When we want to implement the function in the app: Enter place name, code for latitude and longitude, realize navigation function. So, I need to use the Geocoding feature in the native map, and in the core location, it includes the positioning, geocoding (including the anti-coding) feature.Import in File#import Geocoding:/** geocoding */-(void) Geocoder { clgeocoder *geocoder=[[clgeocoder alloc]init]
Step 1: Construct the URL required by the Geocoder APIURL formatHttps://maps.googleapis.com/maps/api/geocode/output? ParametersThe output option is json/xml, and the parameters option is address/language/sensor.URL exampleHttps://maps.googleapis.com/maps/api/geocode/json? Address = Beijing Tiananmen language = zh_CN sensor = falseStep 2: Send an Http request to
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.