通过保持标记在中心移动地图 [英] Move the Map by Keeping the marker in center
本文介绍了通过保持标记在中心移动地图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
每当我移动地图,标记也正与但我想通过保持标记在地图的中心,不断向移动地图。
Whenever I move the map,Marker is also moving with that But I want to move the map by keeping the marker at the center of Map as constant.
我怎样才能达致这?
推荐答案
你为什么不添加标记作为视图。它覆盖在地图上的顶部。
Why don't you add your marker as a view. overlay it on top of the map.
<RelaiveLayout android:layout_width="wrap_content" android:layout_height="wrap_content" >
<mapView ... />
<ImageView android:center_in_parent="true" ... android:src="@drawable/urmarker" />
</RelativeLayout>
如果您使用的是MapFragment标记添加到片段活动
or if your using a MapFragment add the marker to the fragment activity
这篇关于通过保持标记在中心移动地图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文