title: Cluster Marker miscalculating when zoom out Android google maps
body: <p>I'm trying to implement a cluster marker on my map, and it is behaving a little strange, first, it shows me the cluster marker with the right number of markers, but when I zoom out to join other markers it generates another cluster marker which I don't know where it is coming from and why it is showing on the map, I`ll add some image to explain it better:</p>
  
  <p><img src="https://i.stack.imgur.com/wlwIM.png" alt="enter image description here"></p>
  
  <p>Here is the image with zoom in, as you can see, I have a cluster marker with 8 points and another one alone, so when I zoom out it should give me one clusterMarker with 9 points, but look what happens when I zoom out:</p>
  
  <p><img src="https://i.stack.imgur.com/S2Lej.png" alt="enter image description here"></p>
  
  <p>What that cluster marker with 7 points is doing there?</p>
  
  <p>here is my code:</p>
  
  <pre><code>public class MapaViagem extends FragmentActivity implements ClusterManager.OnClusterClickListener&lt;MyItem&gt;, ClusterManager.OnClusterItemClickListener&lt;MyItem&gt; {
  
      private GoogleMap googleMap;
      private String rm_IdViagem;
      private List&lt;ClienteModel&gt; mClienteModel = new ArrayList&lt;ClienteModel&gt;();
      private List&lt;EnderecoModel&gt; mEnderecoModel = new ArrayList&lt;EnderecoModel&gt;();
      private ArrayList&lt;LatLng&gt; coordList = new ArrayList&lt;LatLng&gt;();
      private  ArrayList&lt;String&gt; nomes = new ArrayList&lt;String&gt;();
      private ViagemModel mViagemModel = new ViagemModel();
      private ClusterManager&lt;MyItem&gt; mClusterManager;
      private ProgressDialog dialog;
  
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
  
  
          setContentView(R.layout.maps);
  
  
  
  
  
          try {
  
              Bundle parametros = getIntent().getExtras();
              rm_IdViagem = parametros.getString("id_viagem");
  
              Repositorio ca = new Repositorio(this);
              mViagemModel = ca.getViagemPorId(Integer.valueOf(rm_IdViagem));
  
              Repositorio cl = new Repositorio(this);
              mClienteModel = cl.getClientesViagem(Integer.valueOf(rm_IdViagem));
  
  
              String waypoints = "waypoints=optimize:true";
              String coordenadas = "";
  
              if(mClienteModel != null) {
  
  
                  for (int i = 0; i &lt; mClienteModel.size(); i++) {
  
  
                      Repositorio mRepositorio = new Repositorio(this);
                      mEnderecoModel = mRepositorio.getListaEnderecosDoCliente(Integer.valueOf(mClienteModel.get(i).getClientes_id()));
  
                      for (int j = 0; j &lt; mEnderecoModel.size(); j++) {
  
                          // Loading map
                          initilizeMap();
                          // Changing map type
                          googleMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);
                          // googleMap.setMapType(GoogleMap.MAP_TYPE_HYBRID);
                          // googleMap.setMapType(GoogleMap.MAP_TYPE_SATELLITE);
                          // googleMap.setMapType(GoogleMap.MAP_TYPE_TERRAIN);
                          // googleMap.setMapType(GoogleMap.MAP_TYPE_NONE);
  
                          // Showing / hiding your current location
                          googleMap.setMyLocationEnabled(true);
  
                          // Enable / Disable zooming controls
                          googleMap.getUiSettings().setZoomControlsEnabled(true);
  
                          // Enable / Disable my location button
                          googleMap.getUiSettings().setMyLocationButtonEnabled(true);
  
                          // Enable / Disable Compass icon
                          googleMap.getUiSettings().setCompassEnabled(true);
  
                          // Enable / Disable Rotate gesture
                          googleMap.getUiSettings().setRotateGesturesEnabled(true);
  
                          // Enable / Disable zooming functionality
                          googleMap.getUiSettings().setZoomGesturesEnabled(true);
  
  
                           float latitude = Float.parseFloat(mEnderecoModel.get(j).getLatitude());
                           float longitude = Float.parseFloat(mEnderecoModel.get(j).getLongitude());
  
  
                          coordenadas += "|" + latitude + "," + longitude;
  
  
                          nomes.add(mClienteModel.get(i).getNome());
  
  
                          coordList.add(new LatLng(latitude, longitude));
  
  
  
  
                          mClusterManager = new ClusterManager&lt;MyItem&gt;(MapaViagem.this, googleMap);
  
  
                          mClusterManager.setRenderer(new MyClusterRenderer(MapaViagem.this, googleMap, mClusterManager));
                          addItems(coordList, nomes);
  
                          googleMap.setOnCameraChangeListener(mClusterManager);
                          googleMap.setOnMarkerClickListener(mClusterManager);
  
  
                          mClusterManager.setOnClusterClickListener(this);
  
                          mClusterManager.setOnClusterItemClickListener(this);
  
  
  
  
  
  
  
  
                          mClusterManager.cluster();
  
                          googleMap.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(latitude, longitude), 5));
  
  
                      }
  
  
                  }
  
                              String sensor = "sensor=false";
                              String params = waypoints + coordenadas + "&amp;" + sensor;
                              String output = "json";
                              String url = "https://maps.googleapis.com/maps/api/directions/" + output + "?" + params;
                              ReadTask downloadTask = new ReadTask();
                              downloadTask.execute(url);
              }
  
  
          } catch (Exception e) {
              e.printStackTrace();
          }
      }
  
  
      public class MyClusterRenderer extends DefaultClusterRenderer&lt;MyItem&gt; {
  
          public MyClusterRenderer(Context context, GoogleMap map,
                                   ClusterManager&lt;MyItem&gt; clusterManager) {
              super(context, map, clusterManager);
          }
  
          @Override
          protected void onBeforeClusterItemRendered(MyItem item, MarkerOptions markerOptions) {
              super.onBeforeClusterItemRendered(item, markerOptions);
  
              markerOptions.title(String.valueOf(item.getName()));
          }
  
          @Override
          protected void onClusterItemRendered(MyItem clusterItem, Marker marker) {
              super.onClusterItemRendered(clusterItem, marker);
  
  
  
              //here you have access to the marker itself
          }
  
          @Override
          protected boolean shouldRenderAsCluster(Cluster&lt;MyItem&gt; cluster) {
              return cluster.getSize() &gt; 1;
          }
  
  
  
      }
  }
  </code></pre>