Remove previous marker
<p>I am having a trouble. I am fetching my latitude and longitude in Realtime Firebase and created a marker but every time the latitude and longitude has an update it will create another marker.</p>

<p>How can I delete the previous marker? Here is my code:</p>

<pre><code>passRef = new Firebase(Config.FIREBASE_URL_PASSENGER);
passRef.addValueEventListener(new ValueEventListener() {
    @Override
    public void onDataChange(DataSnapshot dataSnapshot) {
        for (DataSnapshot snapShot : dataSnapshot.getChildren()) {
            for (int cnt = 0; cnt &lt;= dataSnapshot.getChildrenCount(); cnt++) {
                if (snapShot.child("latitude").exists() &amp;&amp; snapShot.child("longitude").exists() &amp;&amp; snapShot.child("destination").exists()) {

                    passUsername = snapShot.child("name").getValue().toString();
                    //getting the passenger's current location
                    locLatPass = Double.valueOf(snapShot.child("latitude").getValue().toString());
                    locLongPass = Double.valueOf(snapShot.child("longitude").getValue().toString());
                    latlngpass = new LatLng(locLatPass, locLongPass);

                    MarkerOptions passLocMarkerOptions = new MarkerOptions();
                    passLocMarkerOptions.position(latlngpass);
                    passLocMarkerOptions.title(passUsername+ "'s Location");

                    passLocMarkerOptions.icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_BLUE));
                    passLocationMarker = mMap.addMarker(passLocMarkerOptions);
                } else {
                }
            }
            Toast.makeText(MapsActivity.this, "Passenger Username" + passUsername + " latitude" + locLatPass + "Longitude" + locLongPass, Toast.LENGTH_LONG).show();
        }
    }

    @Override
    public void onCancelled(FirebaseError firebaseError) {

    }
});
</code></pre>