我可以在 Android Map 中始终保留一些静态标记吗?
我是 Android 编程的新手...这是我正在尝试为一个小型学术项目做的事情:
- 屏幕上显示谷歌地图:完成
- 获取用户的当前位置并显示在地图上: 完成
- 我们有一个来自网络服务的纬度和经度列表,它形成了预定义的路径。我需要根据给定的经纬度列表在地图上显示一条始终显示的路径,并带有静态标记。 怎么做?
我尝试了各种方法,搜索了各种地方,但找不到令人满意的代码或教程来实现相同的目的。有人可以向我指出可以用来获取上述内容的适当资源吗?
I'm a newbie into Android programming... Here's what I'm trying to do for a small academic project:
- A google map displayed on screen: Done
- Get user's current location and show on the map: Done
- We've a list of Latitudes and Longitudes coming from a webservice, which forms a pre-defined path. I need to display an always-shown path on the map with static markers as per the list of Lat-Longs given. How?
I tried various ways, and searched various places, but couldn't find a satisfactory code or tutorial that has achieved the same. Can someone please point me to an appropriate resource that I can use to get the above?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
下载并检查静态标记......................
http://android-codes -examples.blogspot.com/2011/04/google-map-example-in-android-with-info.html
Download and check for static marker..................
https://github.com/commonsguy/cw-android/tree/master/Maps/NooYawk
http://android-codes-examples.blogspot.com/2011/04/google-map-example-in-android-with-info.html
您需要实施
Overlay
并在draw()
方法中绘制路径。使用这个SO帖子 了解如何去做。
You need to implement
Overlay
and draw the path in thedraw()
method.Use this SO post to get an idea of how to do it.