更改 google 地图中标记的原点 android

Change the origin of the marker in google maps android

我使用了自定义标记来给出我的当前位置,但问题是它显示了我输入位置的部分图像的底部。

我希望图片的中心在我输入的位置!

我正在为此目的使用 GoogleMap 和 mapFragment!

使用MarkerOptions.anchor():

MarkerOptions options;
[...]
options.anchor( 0.5f, 0.5f );   //set anchor point in center
map.addMarker( options );