簡體   English   中英

在Google Maps 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 );

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM