title: Marker on user location in Android Google Maps API v2
body: <p>I mark current user location by a custom marker. I draw it once and in <code>OnLocationChange</code> listener I change it position according to user location, but sometimes there is a duplicate markers on the map. Why? Do you have any ideas? And is it good idea to change marker position in <code>OnLocationChange</code> listener?</p>
  
  <p>I drawing marker:</p>
  
  <pre><code>currentUserLocationMarker = mMap.addMarker(new MarkerOptions()
                      .position(new LatLng(currentUserLocation.latitude, currentUserLocation.longitude))
                      .title("Current Location"));
  </code></pre>
  
  <p>and changing his position:</p>
  
  <pre><code>currentUserLocationMarker.setPosition(locLatLng);
  </code></pre>
  
  <p>My method looks like below. I invoke it once in <code>onCreateView()</code> and in <code>OnMyLocationChangeListener()</code>.</p>
  
  <pre><code>if (currentUserLocationMarker == null) {
              currentUserLocationMarker = mMap.addMarker(new MarkerOptions()
                      .position(new LatLng(currentUserLocation.latitude, currentUserLocation.longitude))
                      .title("Current Location"));
          } else {
              currentUserLocationMarker.setPosition(locLatLng);
          }
  </code></pre>
  
  <p>I suppose that better solution is draw once, and changing it position instead drawing, clearing and drawing again all the time.</p>
  
  <p>Removing marker by calling method <code>.remove()</code> is acceptable, but clearing whole map, in the case of I have many markers and e.g. polylines drawn on the map is bad idea.</p>
  
  <p>It would be useful if the map had a separate methods for remove markers and polylines, but now there is a one method <code>.clear()</code> which clear everything.</p>