iOS Baidu map Inverse geocoding (based on 2.3.0--2.4.0SDK development)

Source: Internet
Author: User

Have to say, now the Baidu lbs Department is not no one, ah, sometimes make out some bad things to use

Baidu to do the inverse of the geocoding function, is sure to start the Baidu service first, these will no longer rip.

Bmkgeocodesearch *_geocodesearch = [[Bmkgeocodesearch alloc]init]; _geocodesearch.delegate = self; Bmkreversegeocodeoption *reversegeocodeoption= [[Bmkreversegeocodeoption alloc] init]; Reversegeocodeoption.reversegeopoint = cllocation.coordinate; [_geocodesearch reversegeocode:reversegeocodeoption];

This is the initialization of the inverse geocoding class, where reversegeopoint is required to do inverse geocoding poi coordinate points, and then execute Reversegeocode this method, according to geographical coordinates to obtain geo-location information.

The return result of the inverse geocoding is returned in this method, which is a listening method

/** * Return anti-geocoding search results * @param searcher Search Object * @param result Search Result * @param error error number, @see Bmksearcherrorcode */-(void) ongetrevers Egeocoderesult: (Bmkgeocodesearch *) Searcher Result: (Bmkreversegeocoderesult *) result ErrorCode: (Bmksearcherrorcode ) error;

Returns the result is the Bmkreversegeocoderesult attribute value, the specific attribute value everybody clicks the class inside to see, this I will not say more, good, the simplest inverse geocoding function.

Note: The inverse geocoding monitoring method does not call please check whether Baidu key is correct and valid, whether the authorization is successful.

When using the Geocoding feature in multiple classes, it is recommended to create common classes, function simple interest initialization, only need to receive geolocation information in the Listening Method!

Temporarily on these, we have what do not understand, can leave a message, must return, the technology will communicate more!


iOS Baidu map Inverse geocoding (based on 2.3.0--2.4.0SDK development)

Related Article

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.