百度地图导航的接入(包含三种选择方式驾车、公交、步行)
步骤
1.下载百度的sdk(下载地址:http://lbsyun.baidu.com/sdk/download)
![3dc1fe5849c4dd0938d85cde6fd10bbe.png](https://img-blog.csdnimg.cn/img_convert/3dc1fe5849c4dd0938d85cde6fd10bbe.png)
![8bf754ee00037d3418e11f55e83384b9.gif](https://img-blog.csdnimg.cn/img_convert/8bf754ee00037d3418e11f55e83384b9.gif)
勾选下载“检索功能”开发包,进行解压,将解压后的demo导入eclipse
2.环境配置
在工程属性->Java Build Path->Libraries中选择“Add External JARs”,选定baidumapapi_vX_X_X.jar,确定后返回
![e2541f92a953fb2ae3458305259643d1.png](https://img-blog.csdnimg.cn/img_convert/e2541f92a953fb2ae3458305259643d1.png)
![8bf754ee00037d3418e11f55e83384b9.gif](https://img-blog.csdnimg.cn/img_convert/8bf754ee00037d3418e11f55e83384b9.gif)
参照百度开发指南加入对应的权限和对应的
android:name="com.baidu.lbsapi.API_KEY"
android:value="你的key" />
3.粘贴这两个class到自己的项目中
![aebe149a49efa2a6daff966e56e433f2.png](https://img-blog.csdnimg.cn/img_convert/aebe149a49efa2a6daff966e56e433f2.png)
![8bf754ee00037d3418e11f55e83384b9.gif](https://img-blog.csdnimg.cn/img_convert/8bf754ee00037d3418e11f55e83384b9.gif)
在清单文件中在application中加入下面的一句代码
![0942550c77c2c2efd2acce875eebfdfb.png](https://img-blog.csdnimg.cn/img_convert/0942550c77c2c2efd2acce875eebfdfb.png)
![8bf754ee00037d3418e11f55e83384b9.gif](https://img-blog.csdnimg.cn/img_convert/8bf754ee00037d3418e11f55e83384b9.gif)
对应的将RoutePlanDemo对应的布局文件同时复制到自己的布局文件中(此时会报好多错误,对应的进行修改和删除,直至不报错为止)
运行即可