简体   繁体   English

Andorid-如何获取谷歌地图信息窗口的位置,以便在此位置上设置其他内容?

[英]Andorid- how to get position of google map info window so set something else on this position?

I want to get the position of a google maps info window as to be Seen in the following image so I can set floating button on that position for clicking to perform some task. 我想获取下图所示的google maps信息窗口的位置,因此我可以在该位置上设置浮动按钮以单击以执行某些任务。

在此处输入图片说明

I want to set floating button position after showing popup info in particular position. 我想在特定位置显示弹出信息后设置浮动按钮的位置。

Please don't refer this answer i'll already apply this but sometimes not perform right way. 请不要引用此答案,我已经应用了此方法,但有时执行不正确的方法。

Upon checking the MarkerOptions , there is no class that can get the location of the infowindow. 在检查MarkerOptions时 ,没有任何类可以获取信息窗口的位置。 The closest we can get is getInfoWindowAnchorU and getInfoWindowAnchorV. 我们可以得到的最接近的是getInfoWindowAnchorU和getInfoWindowAnchorV。

getInfoWindowAnchorU ()

Horizontal distance, normalized to [0, 1], of the info window anchor from the left edge. 从左边缘到信息窗口锚点的水平距离,标准化为[0,1]。

getInfoWindowAnchorV ()

Vertical distance, normalized to [0, 1], of the info window anchor from the top edge. 信息窗口锚点到顶部边缘的垂直距离,标准化为[0,1]。

Also, it was advised in this link : 另外,在此链接中建议:

You are advised not to place interactive components — such as buttons, checkboxes, or text inputs — within your custom info window. 建议您不要在自定义信息窗口中放置交互式组件,例如按钮,复选框或文本输入。

Hope it helps! 希望能帮助到你!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM