我是新手,最近两天我很痛苦。我研究了很多,但我没有得到。我在地图上实现了不同的概念,但地图不是moving.It显示当前位置,标记随地图移动。我想保留标记,因为map.Marker上的位置选择器会根据地图的移动来选择不同的位置。请帮助我,我浪费了很多时间来做这件事。
发布于 2017-08-15 22:17:43
你可以用不同的方法来做。最简单-将标记图像添加到地图片段上的ImageView,类似于:
<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>还可以看看this问题。
https://stackoverflow.com/questions/45673092
复制相似问题