private synchronized void drawPosition() {
        positionObjs.removeAll();
        if (this.coordinates == null) {
            return;
        }

        final LatLng latLng = new LatLng(coordinates.getLatitude(), coordinates.getLongitude());

        // accuracy circle
        positionObjs.addCircle(new CircleOptions()
                .center(latLng)
                .strokeColor(MapLineUtils.getAccuracyCircleColor())
                .strokeWidth(3)
                .fillColor(MapLineUtils.getAccuracyCircleFillColor())
                .radius(coordinates.getAccuracy())
                .zIndex(ZINDEX_POSITION_ACCURACY_CIRCLE)
        );

        final Drawable positionMarker = ResourcesCompat.getDrawable(CgeoApplication.getInstance().getResources(), R.drawable.my_location_chevron, null);
        positionObjs.addMarker(new MarkerOptions()
                .icon(BitmapDescriptorCache.toBitmapDescriptor(positionMarker))
                .position(latLng)
                .rotation(heading)
                .anchor(0.5f, 0.5f)
                .flat(true)
                .zIndex(ZINDEX_POSITION)
        );

        final Geopoint destCoords = mapView.getDestinationCoords();
        if (destCoords != null) {
            final Geopoint currentCoords = new Geopoint(coordinates);
            if (Settings.isMapDirection()) {
                // draw direction line
                positionObjs.addPolyline(getDirectionPolyline(currentCoords, destCoords));
            } else if (null != postRealDistance) {
                postRealDistance.postRealDistance(destCoords.distanceTo(currentCoords));
            }
        }

        if (coordinates.hasAltitude() && Settings.showElevation()) {
            final Bitmap elevationInfo = MapUtils.getElevationBitmap(CgeoApplication.getInstance().getResources(), positionMarker.getIntrinsicHeight(), GeoHeightUtils.getAltitude(coordinates));
            positionObjs.addMarker(new MarkerOptions()
                    .icon(BitmapDescriptorFactory.fromBitmap(elevationInfo))
                    .position(latLng)
                    .anchor(0.5f, 0.5f)
                    .flat(false)
                    .zIndex(ZINDEX_POSITION_ELEVATION));
        }
    }
maximum distance (in meters) up to which two points in the trail get connected by a drawn line
main/src/main/java/cgeo/geocaching/maps/google/v2/GooglePositionAndHistory.java