@Override public void onMapClick(LatLng point) { if (marker != null) { marker.remove(); } marker = mMap.addMarker(new MarkerOptions().position(point).title("Your destination")); mMap.moveCamera(CameraUpdateFactory.newLatLng(point)); appMethodsInstance.setGeoPoints(point); }
@Override public void onLocationChanged(Location location) { mCurrentLocation = location; if (location == null) { Toast.makeText(this, "Please switch on your gps", Toast.LENGTH_LONG).show(); } else { mLastUpdateTime = DateFormat.getTimeInstance().format(new Date()); // testing.setText(location.toString() + " Time: " + mLastUpdateTime); appMethodsInstance.updateDistance(); } }