Baidu map API (baitumapapi application) developed for iOS)

Source: Internet
Author: User

I want to use the Baidu map API for a demo. The following is my entire process. I hope to provide some reference for you;

First, open the following URL and carefully read the iOS development guide for mobile platform APIs.

Http://dev.baidu.com/wiki/imap/index.php? Title = IOS % E5 % B9 % B3 % E5 % 8f % B0/% E5 % BC % 80% E5 % 8f % 91% E6 % 8C % 87% E5 % 8d % 97

Click get key to go to the new page.

Enter the following items on the new page: Click Generate API key;

Enter the new page as follows:

Then download the official Baidu map Demo: Click here to download:

Go to the download page and select all downloads (including examples)Code, Technical documentation, API Development Kit); decompress the sample code and click run:

HoweverProgramPrompt ProjectThe mapapi. Bundle and libbaidumapapi. A files are missing,Delete these two directories from the project group.

---------------------------

Now we needDecompress baidumapapilib and you can see that the INC folder contains the header file. libs contains the Baidu API static library of the simulator and device, and mapapi. bundle (Mapapi. Bundle stores resource images for locating, marking view and route key points by default. If you do not need the built-in image display function, you can not add this bundle File), Then we need to merge the static library of the simulator and device's Baidu API into one, so that we can use it later: Open the terminal, enter the directory where the static library is located, and enter it on the terminal, meanwhile, place the generated static library in the libs Folder:



Then enter the LS directory on the terminal to generate a merged static library libbaidumapapi.,


And then merged before adding (addother) to build phases -- Link binary with librariesLibbaidumapapi. A static library;

At the same timeMapapi. Bundle is added to the project;


However, if the project has an error, the system prompts that the bmapkit. h file cannot be found, as shown in


Then, delete all the red font files and add them again from Baidu's baiduapilib/INC:


The program is successfully re-compiled.

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.