更新时间:2022-10-16 09:21:56
You can do it by different ways. Simplest - add marker image to ImageView
over map fragment, something like that:
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<fragment
android:id="@+id/map"
android:layout_width="match_parent"
android:layout_height="match_parent"
class="com.google.android.gms.maps.MapFragment"
/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:src="@drawable/marker"
/>
</RelativeLayout>
Also take a look at this question.