为什么在放大或缩小时不显示群集标记图标 android

Why cluster marker icon not showing when zoom in or zoom out in android

我正在尝试在我的地图上实现一个聚类标记,首先,它向我显示了聚类标记,但是当我放大时,它会展开并显示白色方块,我将添加一些图像来更好地解释它.

images

public class MyItem implements ClusterItem {
        private final LatLng mPosition;
        String Title = "";
        int Icon;

        public MyItem(double lat, double lng, String title, int icon) {
            mPosition = new LatLng(lat, lng);
            Title = title;
            Icon = icon;
        }

        @Override
        public LatLng getPosition() {
            return mPosition;
        }

        public String getTitle() {
            return Title;
        }

        public int getIcon() {
            return Icon;
        }
    }
class OwnIconRendered extends DefaultClusterRenderer<MyItem> {


        public OwnIconRendered() {
            super(MapActivity.this, googleMap, mClusterManager);

        }

        @Override
        protected void onBeforeClusterItemRendered(MyItem item, MarkerOptions markerOptions) {
            markerOptions.icon(BitmapDescriptorFactory.fromResource(item.getIcon()));
            markerOptions.title(item.getTitle());
            super.onBeforeClusterItemRendered(item, markerOptions);
        }



        @Override
        protected void onBeforeClusterRendered(Cluster<MyItem> cluster, MarkerOptions markerOptions) {
            super.onBeforeClusterRendered(cluster, markerOptions);
        }

    }

gmaps 上有一个未解决的问题-api-问题,看这里:https://code.google.com/p/gmaps-api-issues/issues/detail?id=9765

另请看这里:Google map marker is replaced by bounding rectangle on zoom

那里也描述了一些解决方法。