iOS Baidu map Use precautions

Source: Internet
Author: User
<span id="Label3"></p><p><p><span style="color:rgb(98,98,98); font-family:微软雅黑,‘Microsoft YaHei‘,sans-serif; font-size:14px; line-height:20px">The first step, the introduction of Baidumapapi.framework</span></p></p><p><p><span style="color:rgb(98,98,98); font-family:微软雅黑,‘Microsoft YaHei‘,sans-serif; font-size:14px; line-height:20px"><span style="color:rgb(98,98,98); font-family:微软雅黑,‘Microsoft YaHei‘,sans-serif; font-size:14px; line-height:20px">The second step, the introduction of the required system library</span><br></span></p></p><p><p><span style="color:rgb(98,98,98); font-family:微软雅黑,‘Microsoft YaHei‘,sans-serif; font-size:14px; line-height:20px"><span style="color:rgb(98,98,98); font-family:微软雅黑,‘Microsoft YaHei‘,sans-serif; font-size:14px; line-height:20px"><span style="color:rgb(98,98,98); font-family:微软雅黑,‘Microsoft YaHei‘,sans-serif; font-size:14px; line-height:20px">Introduction of Corelocation.framework and quartzcore.framework, opengles.framework, systemconfiguration.framework, in the Xcode project coregraphics.framework, Security.framework. How to add: add these frameworks in the Xcode project, Active Target->build phases->link Binary with Libraries.</span></span></span></p></p><p><p><span style="color:rgb(98,98,98); font-family:微软雅黑,‘Microsoft YaHei‘,sans-serif; font-size:14px; line-height:20px">The third step, environment configuration</span></p></p><p><p><span style="color:rgb(98,98,98); font-family:微软雅黑,‘Microsoft YaHei‘,sans-serif; font-size:14px; line-height:20px">ADD-OBJC in the Targets->build settings->other Linker Flags.</span></p></p><p><p><span style="font-family:微软雅黑,‘Microsoft YaHei‘,sans-serif; font-size:14px; line-height:20px"><span style="color:#ff0000">Fourth step, introduce Mapapi.bundle resource file</span></span></p></p><p><p><span style="font-family:微软雅黑,‘Microsoft YaHei‘,sans-serif; font-size:14px; line-height:20px"></span></p></p><p style="color:rgb(98,98,98); font-family:微软雅黑,‘Microsoft YaHei‘,sans-serif; padding:0px 15px; margin-top:6px; margin-bottom:6px; font-size:14px; line-height:20px"><p style="color:rgb(98,98,98); font-family:微软雅黑,‘Microsoft YaHei‘,sans-serif; padding:0px 15px; margin-top:6px; margin-bottom:6px; font-size:14px; line-height:20px">If you use the underlying map feature, you need to add the resource, or the map will not display properly</p></p><p style="color:rgb(98,98,98); font-family:微软雅黑,‘Microsoft YaHei‘,sans-serif; padding:0px 15px; margin-top:6px; margin-bottom:6px; font-size:14px; line-height:20px"><p style="color:rgb(98,98,98); font-family:微软雅黑,‘Microsoft YaHei‘,sans-serif; padding:0px 15px; margin-top:6px; margin-bottom:6px; font-size:14px; line-height:20px">Mapapi.bundle stores a resource picture of location, default pin callout view, and Route key, and also stores the necessary resource files for vector map Drawing. If you do not need to use the built-in picture display feature, You can delete the image folder in the bundle File. You can also arbitrarily replace or delete the image file of the image folder in the bundle according to your specific needs.</p></p><p style="color:rgb(98,98,98); font-family:微软雅黑,‘Microsoft YaHei‘,sans-serif; padding:0px 15px; margin-top:6px; margin-bottom:6px; font-size:14px; line-height:20px"><p style="color:rgb(98,98,98); font-family:微软雅黑,‘Microsoft YaHei‘,sans-serif; padding:0px 15px; margin-top:6px; margin-bottom:6px; font-size:14px; line-height:20px">Method: Select the project name, Select Add Files to "project name" in the right-click menu, from baidumapapi.framework| | Resources file, Select the Mapapi.bundle file and tick the "Copy items if needed" check box and click the "add" button to add the resource file to the Project.</p></p><p style="color:rgb(98,98,98); font-family:微软雅黑,‘Microsoft YaHei‘,sans-serif; padding:0px 15px; margin-top:6px; margin-bottom:6px; font-size:14px; line-height:20px"><p style="color:rgb(98,98,98); font-family:微软雅黑,‘Microsoft YaHei‘,sans-serif; padding:0px 15px; margin-top:6px; margin-bottom:6px; font-size:14px; line-height:20px"><br></p></p><p style="color:rgb(98,98,98); font-family:微软雅黑,‘Microsoft YaHei‘,sans-serif; padding:0px 15px; margin-top:6px; margin-bottom:6px; font-size:14px; line-height:20px"><p style="color:rgb(98,98,98); font-family:微软雅黑,‘Microsoft YaHei‘,sans-serif; padding:0px 15px; margin-top:6px; margin-bottom:6px; font-size:14px; line-height:20px">Fifth step, introduce the header file</p></p><p style="font-family:微软雅黑,‘Microsoft YaHei‘,sans-serif; padding:0px 15px; margin-top:6px; margin-bottom:6px; font-size:14px; line-height:20px"><p style="font-family:微软雅黑,‘Microsoft YaHei‘,sans-serif; padding:0px 15px; margin-top:6px; margin-bottom:6px; font-size:14px; line-height:20px"><span style="color:rgb(98,98,98)"></span></p></p><p style="font-family:微软雅黑,‘Microsoft YaHei‘,sans-serif; padding:0px 15px; margin-top:6px; margin-bottom:6px; color:rgb(98,98,98); font-size:14px; line-height:20px"><p style="font-family: Microsoft Jacob black, ' Microsoft Yahei ', sans-serif; padding:0px 15px; margin-top:6px; margin-bottom:6px; Color:rgb (98,98,98); font-size:14px; line-height:20px "> Introducing header files in classes using the Sdk: </p></p><pre class="de1" style="font-family:monospace,monospace; padding:0px; border:0px none white; color:rgb(10,128,33); line-height:1.2em; overflow:hidden; word-break:break-all; word-wrap:break-word; margin-top:0px; margin-bottom:0px; font-size:1em; vertical-align:top; background:none"><pre class="de1" style="font-family:monospace,monospace; padding:0px; border:0px none white; color:rgb(10,128,33); line-height:1.2em; overflow:hidden; word-break:break-all; word-wrap:break-word; margin-top:0px; margin-bottom:0px; font-size:1em; vertical-align:top; background:none"><span class="sy0" style="color:rgb(51,153,51)"><</span> Baidumapapi<span class="sy0" style="color:rgb(51,153,51)">/</span>bmapkit. <span class="me1" style="color:rgb(102,0,102)">h</span> <span class="sy0" style="color:rgb(51,153,51)">></span> <span class="co1" style="color:rgb(0,102,0); font-style:italic">//introduction of all header files</span> <span class="sy0" style="color:rgb(51,153,51)"><</span> Baidumapapi<span class="sy0" style="color:rgb(51,153,51)">/</span>BMKMAPVIEW. <span class="me1" style="color:rgb(102,0,102)">h</span> <span class="sy0" style="color:rgb(51,153,51)">></span> <span class="co1" style="color:rgb(0,102,0); font-style:italic">//introduce only the desired single header file</span></pre></pre>The above is quoted on the Baidu map document content,<span style="color:#ff0000"><span style="color:#ff0000">Here's the fourth One. <span style="font-family:微软雅黑,‘Microsoft YaHei‘,sans-serif; font-size:14px; line-height:20px">these are actually available in the framework, but they still need to be added to the project Separately. </span></span></span><p><p><span style="font-family:微软雅黑,‘Microsoft YaHei‘,sans-serif; font-size:14px; line-height:20px"></span></p></p><p style="word-wrap:break-word; margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; color:rgb(68,68,68); font-family:Tahoma,‘Microsoft Yahei‘,Simsun; font-size:14px; line-height:20px; text-indent:2em; background-color:rgb(250,250,250)"><p style="word-wrap:break-word; margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; color:rgb(68,68,68); font-family:Tahoma,‘Microsoft Yahei‘,Simsun; font-size:14px; line-height:20px; text-indent:2em; background-color:rgb(250,250,250)"><span style="color:red; word-wrap:break-word">Also need to add in Info.plist (the following two select one, two are added by default using nslocationwheninuseusagedescription):</span></p></p><p style="word-wrap:break-word; margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; color:rgb(68,68,68); font-family:Tahoma,‘Microsoft Yahei‘,Simsun; font-size:14px; line-height:20px; text-indent:2em; background-color:rgb(250,250,250)"><p style="word-wrap:break-word; margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; color:rgb(68,68,68); font-family:Tahoma,‘Microsoft Yahei‘,Simsun; font-size:14px; line-height:20px; text-indent:2em; background-color:rgb(250,250,250)"><span style="color:red; word-wrap:break-word">nslocationwheninuseusagedescription, allowing the GPS description to be used in the foreground</span></p></p><p style="word-wrap:break-word; margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; color:rgb(68,68,68); font-family:Tahoma,‘Microsoft Yahei‘,Simsun; font-size:14px; line-height:20px; text-indent:2em; background-color:rgb(250,250,250)"><p style="word-wrap:break-word; margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; color:rgb(68,68,68); font-family:Tahoma,‘Microsoft Yahei‘,Simsun; font-size:14px; line-height:20px; text-indent:2em; background-color:rgb(250,250,250)"><span style="color:red; word-wrap:break-word">nslocationalwaysusagedescription, allow permanent use of GPS description</span></p></p><p style="word-wrap:break-word; margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; font-family:Tahoma,‘Microsoft Yahei‘,Simsun; font-size:14px; line-height:20px; text-indent:2em; background-color:rgb(250,250,250)"><p style="word-wrap:break-word; margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; font-family:Tahoma,‘Microsoft Yahei‘,Simsun; font-size:14px; line-height:20px; text-indent:2em; background-color:rgb(250,250,250)"><br></p></p><p style="word-wrap:break-word; margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; font-family:Tahoma,‘Microsoft Yahei‘,Simsun; font-size:14px; line-height:20px; text-indent:2em; background-color:rgb(250,250,250)"><p style="word-wrap:break-word; margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; font-family:Tahoma,‘Microsoft Yahei‘,Simsun; font-size:14px; line-height:20px; text-indent:2em; background-color:rgb(250,250,250)">In use because there is no operation 4th step, resulting in engine initialization failure, Baidu's documentation is really inconvenient. Write down this hope to provide some help to the friends who will use Baidu Map.</p></p><p><p><span style="color:rgb(98,98,98); font-family:微软雅黑,‘Microsoft YaHei‘,sans-serif; font-size:14px; line-height:20px"><span style="color:rgb(98,98,98); font-family:微软雅黑,‘Microsoft YaHei‘,sans-serif; font-size:14px; line-height:20px"><span style="color:rgb(98,98,98); font-family:微软雅黑,‘Microsoft YaHei‘,sans-serif; font-size:14px; line-height:20px"><br></span></span></span></p></p><p><p>iOS Baidu map Use precautions</p></p></span>

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.