代码之家  ›  专栏  ›  技术社区  ›  Arshdeep Singh

在googlemaps android中更改标记的来源

  •  0
  • Arshdeep Singh  · 技术社区  · 6 年前

    enter image description here

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

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

    我使用GoogleMap和mapFragment来实现这个目的!

    1 回复  |  直到 6 年前
        1
  •  2
  •   greeble31    6 年前

    使用 MarkerOptions.anchor()

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