private fun drawUserPositionMarker(location: Location) { val latLng = LatLng(location.latitude, location.longitude) if (this.userPositionMarkerBitmapDescriptor == null) { userPositionMarkerBitmapDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.user_position_point) } userPositionMarker?.let{ it.setPosition(latLng) } ?: run{ userPositionMarker = map.addMarker( MarkerOptions() .position(latLng) .flat(true) .anchor(0.5f, 0.5f) .icon(this.userPositionMarkerBitmapDescriptor) ) } }