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