Change from AMAP to Google Maps
已完成Hello all,
I was wondering how can I use Google Maps instead of AMAP at DJI [Mobile-SDK-Android-V5 project](https://github.com/dji-sdk/Mobile-SDK-Android-V5).
Thank you in advance!
-
MapWidget has already adapted Google Maps. You can view the MapWidget code and switch between different map types. java private void setMapProvider(SettingDefinitions.MapProvider provider, String accessToken) { switch (provider) { case HERE: // removed break; case AMAP: initAMap(null); break; case MAPLIBRE: initMapLibreMap(accessToken, null); break; case GOOGLE: initGoogleMap(null); break; default: // do nothing }} Taking the example of "sample", if you need to use the full functionality of Google Maps, you will need to fill in the complete GMAP_API_KEY in the gradle.properties file. The initGoogleMap function can be used to initialize Google Maps, and you can refer to the sample for specific usage:https://github.com/dji-sdk/Mobile-SDK-Android-V5/blob/dev-sdk-main/SampleCode-V5/android-sdk-v5-sample/module-aircraft/src/main/java/dji/sampleV5/moduleaircraft/pages/WayPointV3Fragment.kt#L508
请先登录再写评论。
评论
2 条评论