Open Baidu Map by calling the device's own browser
1 //1. Define a method to open the features of Google Maps2-(ibaction) openmaps3 {4 //2. Define a string, as the current location of Baidu map abandoned5NSString *addresstest =@"";6 //3. In the request URL path, if the Chinese language is included, the request will be unsuccessful. This is the need to convert the Chinese parameter to the U.S. Standard Information Interchange code. 7Addresstest =[Addresstest stringbyaddingpercentescapesusingencoding:nsasciistringencoding];8 //4. Define a full URL path9NSString *urltext = [NSString stringWithFormat:@"http://map.baidu.com%@", addresstest];TenNSLog (@"urltext======%@", urltext); One A //5. Get the application singleton object, and then call the object's open URL method to open the URL of the specified path - [[uiapplication sharedapplication] Openurl:[nsurl Urlwithstring:urltext]]; -}
Add a call to the Viewdidload function after the second method
1 [self openmaps];
Operation Result:
IOS network with multi-threaded--8. Use of Baidu maps (call system browser)