谷歌地图中自定义集群图标的问题

问题描述

我以这种方式更改了集群的认图标

internal class MarkerClusterRenderer(context: Context?,map: GoogleMap?,clusterManager: ClusterManager<PointOfInterest>?) : DefaultClusterRenderer<PointOfInterest>(context,map,clusterManager) {
        override fun onBeforeClusterItemRendered(item: PointOfInterest,markerOptions: MarkerOptions) {
            markerOptions.icon(BitmapDescriptorFactory.fromresource(getMarkerResource(item)))
        }

        override fun onBeforeClusterRendered(cluster: Cluster<PointOfInterest>,markerOptions: MarkerOptions) {
            super.onBeforeClusterRendered(cluster,markerOptions)
            markerOptions.icon(BitmapDescriptorFactory.fromresource(R.drawable.ic_cluster))

        }
}

但现在没有显示聚集的标记数量。我怎么能看到它?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)