amap_flutter_tools
基于高德地图sdk,集成导航、路线规划、定位、地图
flutte amap tools plugin
Getting Started
This project is a starting point for a Flutter plug-in package, a specialized package that includes platform-specific implementation code for Android and/or iOS.
本插件集成高德地图sdk中的3D地图、定位、路线规划、模拟导航和真实导航功能 更多需求和内容请查阅高德地图官方api
:https://lbs.amap.com/
由于高德地图官方flutter plugin 没有路线规划和导航,所以作此集成,使用安卓原生java代码实现导航功能。
开始使用
github版引用插件
1、在flutter项目目录下的pubspec.yaml中添加以下代码引用插件:
amap_flutter_tools:
git:
url: https://github.com/1272416334/amap_flutter_tools
ref: main
2、在项目目录下的android/app/build.gradle文件中的dependencies添加以下代码引用导航库:
implementation 'com.amap.api:navi-3dmap:latest.integration'
3、在android/app/src/main/AndroidManifest.xml,application标签内添加以下代码注册activity:
不注册activity无法使用,还未深入接触安卓原生,不明原因,后期可能会修改
<activity android:name="com.amap_flutter_tools.activity.EmulatorActivity"/
<activity android:name="com.amap_flutter_tools.activity.BaseActivity"/>
<activity android:name="com.amap_flutter_tools.activity.CustomAmapRouteActivity"/>
目前插件还未完善,example中只展示了导航功能,以后会更新
导航示例
For help getting started with Flutter development, view the online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.
flutterPackage
Libraries
- amap_flutter_location
- amap_flutter_map
- 高德地图Flutter插件入口文件
- amap_location_option
- core/amap_flutter_platform
- core/map_event
- core/method_channel_amap_flutter_map
- types/base_overlay
- types/bitmap
- types/camera
- types/marker
- types/marker_updates
- types/polygon
- types/polygon_updates
- types/polyline
- types/polyline_updates
- types/types
- types/ui