title: android marker remove() method not working
body: <p>I use List to store marker to add to gmap and remove component it self.</p>
  
  <pre><code>List&lt;Location&gt; listLocation = new ArrayList&lt;Location&gt;();
  </code></pre>
  
  <p>When location updated. I were store Location to listLocation,remove the old marker . Then add the newest location to Gmap.</p>
  
  <pre><code>     @Override
          public void onLocationChanged(Location location) {
              // TODO Auto-generated method stub
              countUpdatePos++;
  
          listLocation.add(location);
          LatLng lastLocation = new LatLng(location.getLatitude(),
                  location.getLongitude());
          gmap.moveCamera(CameraUpdateFactory.newLatLngZoom(lastLocation, 16));
          String cityName = null;
          Geocoder gcd = new Geocoder(getBaseContext(), Locale.getDefault());
          List&lt;Address&gt; addresses = null;
          try {
              addresses = gcd.getFromLocation(location.getLatitude(),
                      location.getLongitude(), 1);
              if (addresses.size() &gt; 0) {
                  int a = addresses.get(0).getMaxAddressLineIndex();
                  for (int i = 0; i &lt; a; i++) {
                      if (i == 0) {
                          cityName = addresses.get(0).getAddressLine(i);
                      } else {
                          cityName = cityName + ", "
                                  + addresses.get(0).getAddressLine(i);
                      }
                  }
              }
          } catch (IOException e) {
              e.printStackTrace();
          }
          if (countUpdatePos == 1) {
              Toast.makeText(getApplicationContext(),
                      getResources().getString(R.string.updated_position), 2000)
                      .show();
              progressToLoadMap.setVisibility(View.GONE);
              checkStartActivity = true;
              timer = new MyCount((int) totalTime * 60 * 1000, 1000);
              timer.start();
          }
  
          if (listLocation.size() &gt; 1) {
              listLocation.add(location);
  //          gmap.clear();
              LatLng newLocation = new LatLng(location.getLatitude(),
                      location.getLongitude());
              gmap.moveCamera(CameraUpdateFactory.newLatLngZoom(newLocation, 16));
  
              myMarker = gmap.addMarker(new MarkerOptions().position(new LatLng(
                      listLocation.get(listLocation.size() - 1).getLatitude(),
                      listLocation.get(listLocation.size() - 1).getLongitude())));
              if (myMarker != null) {
                  myMarker.remove();
                  myMarker = null;
              }
              gmap.addMarker(new MarkerOptions()
                      .title(getResources().getString(
                              R.string.current_location_found)).snippet(cityName)
                      .position(newLocation));
              if (listLocation.get(listLocation.size() - 1) != null
                      &amp;&amp; listLocation.get(listLocation.size() - 1) != null) {
                  gmap.addPolyline(new PolylineOptions()
                          .add(new LatLng(listLocation.get(
                                  listLocation.size() - 1).getLatitude(),
                                  listLocation.get(listLocation.size() - 1)
                                          .getLongitude()),
                                  new LatLng(location.getLatitude(), location
                                          .getLongitude())).width(3)
                          .color(Color.BLUE));
              }
  </code></pre>
  
  <p>But when run activity, all marker still display, and no polyline add to gmap :(. Help me
   here is picture
  <img src="https://i.stack.imgur.com/miy4h.png" alt="enter image description here"></p>