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
set of Baidu API, the premise is that there is a Baidu account and apply for the corresponding key. In fact, in addition to Baidu, Google, ESRI, Microsoft Bing, etc. have similar geocoding services. 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'
distance returned, Unit m * */public static double getdistance (double lon1,double lat1,double lon2, Dou ble lat2) {Double radLat1 = rad (LAT1); Double radLat2 = rad (LAT2); Double A = RADLAT1-RADLAT2; Double b = rad (Lon1)-Rad (Lon2); Double s = 2 * Math.asin (MATH.SQRT (Math.pow (Math.sin (A/2), 2) +math.cos (RADLAT1) *math.cos (RADLAT2) *math.pow (Math.sin ( B/2), 2)); s = S * earth_radius; s = Math.Round (S * 10000)/10000; return s;} public static void Main (String []ar
, such as ArcMap and arcglobe, can also serve as GIS clients.
When using services on ArcGIS Server, you can access it like using local resources. For example, when accessing the map service on the server, it is like storing map documents and data locally.
Releasing GIS resource as a service is the key for people to access it. Generally, resources are created through ArcGIS Desktop and published as services for the client.
The following table lists the services that can be published and the
callback function named "done" and calls it at the end of the function. After the two "done" Callback functions are complete, the callback functions of the parallel function are called and executed or processed to generate the results or errors of the two asynchronous functions.
Promises ModelDerived from CommonJS/:
Promise indicates the final result returned after an operation is completed independently.
Many libraries contain the promise model. jQuery already has a usable and outstanding
) { done( null, result ); } }); }], function( errors, results ) { getRoute( results[0], results[1] );});
This code executes two asynchronous functions. Each function receives a callback function named "done" and calls it at the end of the function. After the two "done" Callback functions are complete, the callback functions of the parallel function are called and executed or processed to generate the results or errors of the two asynchronous functions.
Promises ModelDerived fr
location = locationManager. getLastKnownLocation (provider); Geopoint point = new Geopoint (int) (location. getLatitude * 1E6), (int) (location. getlong1_* 1E6); mMapController. setCenter (point );
In the same way, if you know the longitude and latitude of a city, you can set it as the current map center, which enables you to locate the city location. How can you get the longitude and latitude of a city?Baidu Map API provides MKSearch. geocode (Strin
identifier: @ Software Park]; [self. mgr startMonitoringForRegion: circular] ;}# pragma mark-CLLocationManagerDelegate // call-(void) locationManager :( CLLocationMa Nager *) manager didEnterRegion :( CLRegion *) region {NSLog (@ called when you enter the listening area);} // call when you leave the listening area-(void) locationManager :( CLLocationManager *) manager didExitRegion :( CLRegion *) region {NSLog (@ called when leaving the listening area);} // # pragma mark-lazy loading-(CLLocatio
two asynchronous functions, each receiving a callback function named "Done" and calling it at the end of the function. When the two "done" callback function is finished, the callback function of the parallel function is called and executes or handles the results or errors produced by the two asynchronous functions.
Promises modelQuote from commonjs/a:
Promise represents the final result of an operation being returned after it has been completed independently.
There are many librari
://maps.google.com/maps/api/geocode/output?parameters
Where,outputIt can be one of the following values:
json(Recommended) output in the form of JavaScript Object Notation (JSON)
xmlOutput in XML format
Some parameters are required and some are optional. According to the URL standard, all parameters use characters (. These parameters and their possible values are enumerated below.
The Google geocoding API uses the following URL parameters to defin
follows: (for complete information, see Demo)
// Normal state // The following _ mapView is the BMKMapView object _ mapView. showsUserLocation = YES; // display the positioning layer [_ mapView updateLocationData: userLocation];
Geocode
Geographic Encoding refers to the process of establishing a spatial coordinate relationship between address information. It can also be divided into forward and reverse map encoding.
Forward
form:
Http://maps.google.com/maps/api/geocode/output?parameters where output can be one of the following values:
JSON (recommended) means that output XML representations in the form of JavaScript Object Notation (JSON) are required to output some parameters as XML, and some are optional. All parameters are delimited by the character () According to the URL's criteria. These parameters and their possible values are enumerated below.
The Google Geocod
station, WIFI, etc.address Translation interface [NEW]Geocode/ip_to_geo return geographic information based on IP Geocode/address_to_geo interface that returns coordinates based on address geocode/geo_to_address returns address information based on coordinatesDriving route Search interface [NEW]Navigation/route Drive Route EnquiryBus Search interface [NEW]Bus/tr
function: ArcGIS Server provides the ArcGIS Engine function in the server environment to reinforce the shortcomings of ArcGIS Desktop. As a server environment, you do not need to have any end-user application or ArcGIS desktop tool. All functions are backed by exposed objects ).ArcGIS Server adds a group of coarse grained software objects (or helper objects) that can be generated and executed on the server. In fact, these extensive objects are built into ArcGIS desktop applications based on the
---restore content starts---extends:http://blog.csdn.net/h7870181/article/details/12505883Google Maps API Web ServiceWebsite address:Https://developers.google.com/maps/documentation/webservices/?hl=zh-cnis actually some interface for us to invoke, such as:1, according to the address to obtain latitude and longitudeHttp://maps.google.com/maps/api/geocode/json?address= Beijing language=zh-cnsensor=false2. Calculate route datahttp://maps.googleapis.com/m
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.