绘制不同的标记每个地方GoogleMap的Andr​​oid版V2 [英] plot a different marker for each place googlemap v2 android

查看:229
本文介绍了绘制不同的标记每个地方GoogleMap的Andr​​oid版V2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我设法用自己保存的标题和坐标放置在我的数据库中的每个项目的标记。

I have managed to place a marker for each item in my database using their stored title and coordinates.

我现在正在试图改变每个信息窗口的内容,以便它显示相关的每一个地方(除了标题和摘要等)的信息也各地方有不同的图标标记。如何给一个自定义的图标和信息窗口不同的每个地方?
我创建标记不同的图标。
信息加载格式JSON和图标标记也在我的database.should我加载它们,或把他们在绘制文件夹中。

I am now trying to change the content of each InfoWindow so that it shows information related to each place (other than the title and snippet)also each place have a different icon marker. how to give a custom icon and a different infowindow for each place? i create the different icons for marker. the information are loading in format json and the icon marker are also in my database.should i load them or put them in drawable folder.

推荐答案

谷歌涵盖了你最希望自己的谷歌地图API V2文档中做什么。

Google covers most of what you want to do in their Google Maps API v2 documentation.

信息窗口定制并的自定义标记有code例如如何做的。为了您的标记图标,它们只是不同的颜色标记或者他们完全自定义的?在绘制存储它们是确定的,可以很容易地通过访问

Info Window Customization and Customizing a MArker have code example how-to's. For your marker icons, are they just a different colour marker or are they completely customized? Storing them in drawable is ok and can be accessed easily using

.icon(BitmapDescriptorFactory.fromResource(R.drawable.your_custom_marker))

创建/加入标记时。

when creating/adding the Marker.

这篇关于绘制不同的标记每个地方GoogleMap的Andr​​oid版V2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆