public void redraw ( ) { Layers mapOverlays = clusterManager . getMapView ( ) . getLayerManager ( ) . getLayers ( ) ; if ( clusterMarker != null && ! clusterManager . getCurBounds ( ) . contains ( center ) && mapOverlays . contains ( clusterMarker ) ) { mapOverlays . remove ( clusterMarker ) ; return ; } if ( clusterMarker != null && mapOverlays . size ( ) > 0 && ! mapOverlays . contains ( clusterMarker ) && ! clusterManager . isClustering ) { mapOverlays . add ( 1 , clusterMarker ) ; } }
add the ClusterMarker to the Layers if is within Viewport otherwise remove .