如何在谷歌地图上绘制带有按钮、文本和图像的叠加层
我是安卓新手。我正在开发一个使用地图的项目。我想在特定地理点上绘制一个覆盖项目,其中包含一个矩形、一些位置信息和一个按钮,该按钮在单击时使覆盖不可见。我可以在overlay的draw方法中使用drawRect()和drawText()绘制矩形和文本。问题是如何绘制一个按钮作为叠加层的一部分,该按钮是可点击的或类似的东西。任何人都可以建议一些东西......???
I am new to android. I am working on a project which uses map. I want to draw an overlay item on a specific geopoint which contains a rectangle, some location info and a button which makes the overlay invisible when clicked. I can draw rectangle and text using drawRect() and drawText() in the draw method of overlay. The problem is that how to draw a button as a part of overlay which is clickable or something like that. Can anybody suggest something...???
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
阅读以下链接并下载链接中的代码
https://github.com/jgilfelt/android-mapviewballoons< /a>
https://github.com/jgilfelt/android-mapviewballoons#readme。
在地图上显示按钮确实很好用。
Read the following links and download the code in the links
https://github.com/jgilfelt/android-mapviewballoons
https://github.com/jgilfelt/android-mapviewballoons#readme.
it really working nice to display button on the map.