简体   繁体   English

Google Maps - 按类型标记聚类

[英]Google Maps - Clustering by type markers

Question about GoogleMap from Google Maps API Android v2.关于 Google Maps API Android v2 中的 GoogleMap 的问题。 I use clustering library android-maps-ekstensions .我使用聚类库android-maps-ekstensions The map markers are of different types.地图标记有不同的类型。 The problem that the markers of different types are clustered together.不同类型的标记聚集在一起的问题。 Is it possible to cluster the markers by type in different clusters?是否可以在不同的集群中按类型对标记进行聚类?

This is not possible as of version 1.3.1 of the library.从库的 1.3.1 版开始,这是不可能的。

This is already on the TODO list, so you may want to star Issue 10 to be notified of the progress.这已经在待办事项列表中,因此您可能希望为第 10 期加注星标以了解进度。

Edit:编辑:

This is available as of version 1.5 via a simple call:从 1.5 版开始,通过一个简单的调用就可以使用:

theMarker.setClusterGroup(777);

The default group is 0 and only Marker s with the same group are clustered together, so if you assign some int value to every Marker type, you will be good.默认组为0并且只有具有相同组的Marker聚集在一起,因此如果您为每个Marker类型分配一些int值,您会很好。

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

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