【问题标题】:Change the origin of the marker in google maps android在谷歌地图android中更改标记的原点
【发布时间】:2019-03-18 12:54:00
【问题描述】:

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

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

我正在为此使用 GoogleMap 和 mapFragment!

【问题讨论】:

    标签: android google-maps maps marker


    【解决方案1】:

    使用MarkerOptions.anchor():

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-04-27
      • 1970-01-01
      • 1970-01-01
      • 2015-02-16
      • 2020-02-02
      • 2015-07-20
      相关资源
      最近更新 更多