Android 谷歌地图如何在自定义位置显示我的位置标记?
我想在自定义位置显示“我的位置”(蓝色圆形)标记,因为我可以选择从地图中选择我的位置,而不是使用GPS/Wifi/GSM中的位置,是否可以在Android上使用现有的Google Maps API?或者可能以某种方式提取资产并在MapView中将其显示为自定义标记?我最终使用类似于Google Maps中的XML实现了自定义标记:Android 谷歌地图如何在自定义位置显示我的位置标记?,android,google-maps-markers,google-maps-android-api-2,android-maps-v2,Android,Google Maps Markers,Google Maps Android Api 2,Android Maps V2,我想在自定义位置显示“我的位置”(蓝色圆形)标记,因为我可以选择从地图中选择我的位置,而不是使用GPS/Wifi/GSM中的位置,是否可以在Android上使用现有的Google Maps API?或者可能以某种方式提取资产并在MapView中将其显示为自定义标记?我最终使用类似于Google Maps中的XML实现了自定义标记: <?xml version="1.0" encoding="UTF-8"?> <layer-list xml
<?xml version="1.0" encoding="UTF-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="oval">
<solid android:color="@color/map_my_location_inner" />
</shape>
</item>
<item
android:bottom="0.5dp"
android:left="0.5dp"
android:right="0.5dp"
android:top="0.5dp">
<shape android:shape="oval">
<solid android:color="@color/map_my_location_outer" />
</shape>
</item>
<item
android:bottom="2dp"
android:left="2dp"
android:right="2dp"
android:top="2dp">
<shape android:shape="oval">
<solid android:color="@color/map_my_location_inner" />
</shape>
</item>
</layer-list>
它并不完美,因为一旦谷歌改变它,或者不支持开箱即用的夜间模式,它就会过时,但对我来说,就目前而言,它是有效的。我愿意接受任何更好的解决方案