I am facing this ugly problem, can anyone solve this ? I want to get rid of that ugly spacec between lines. I need to keep the width.
code(adding polylines) :
thread {
val response = getResponse(points[1].location, points[2].location, "driving21.").log()
when (response) {
is Result.Failure -> "Fail".log()
is Result.Success ->
response.value.routes[0].listOfLegs[0].listOfSteps.forEach { element ->
// element.points.log()
val options = PolylineOptions()
options.color(Color.rgb(255, 26, 140))
options.width(50F)
options.addAll(PolyUtil.decode(element.points))
runOnUiThread {
map.addPolyline(options)
}
}
}
after adding .jointType(JointType.ROUND)
there is another problem
.jointType(JointType.ROUND)
Adding this line should do it for you