IOS Baidu Map Anti-retrieval address problem

Source: Internet
Author: User

Today, I encountered a problem, I get the current user's track data list from the server, want to retrieve the user's path address by reverse retrieval, the logic code basically is this

Bmkgeosearch *signlesearch;

For (location in Locationarray)

{

Cllocationcoordinate2d pt = xxxxx;

Bmkreversegeocodeoption *reversegeocodesearchoption = [[Bmkreversegeocodeoption alloc]init];

Reversegeocodesearchoption.reversegeopoint = pt;

BOOL flag = [Serch reversegeocode:reversegeocodesearchoption];

if (flag)

{

Bmkpointannotation *item = [[Bmkpointannotation alloc]init];

Item.coordinate = pt;

[Bmapview Addannotation:item];

}

Else

{

NSLog (@ "anti-geo retrieval send failed");

}

}

Code to run each time can only get a latitude and longitude address, other latitude and longitude of the address are not get, looked for a long time, tried a lot of methods useless, finally review a bit of code, think it might be a bmkgeosearch instance can only be adapted to one retrieval at a time, and then modified the code, A search instance was reassigned for each search and the result was successful. However, this will result in a memory explosion at the same time, which is subject to subsequent modifications

IOS Baidu Map Anti-retrieval address problem

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.