I'm using the free Maps SDK for Android with https://googlemaps.github.io/android-maps-compose/index.html I wanted to draw lines between two points.but Polyline drawing straight line. Does anyone have any ideas?
my code:
val singapore = LatLng(49.836510, 24.064096)
val singapore2 = LatLng(49.840191, 24.043384)
val cameraPositionState = rememberCameraPositionState {
position = CameraPosition.fromLatLngZoom(singapore, 0f)
}
GoogleMap(
modifier = Modifier.fillMaxWidth(),
cameraPositionState = cameraPositionState
) {
Polyline(points=listOf(singapore,singapore2),jointType= JointType.ROUND)
Marker(
position = singapore,
title = "Compra",
icon = bitmapDescriptorFromVector(context,R.drawable.shopping_cart_in_a_circle_svgrepo_com)
)
Marker(
position = singapore2,
title = "Compra",
icon = bitmapDescriptorFromVector(context,R.drawable.shopping_cart_in_a_circle_svgrepo_com)
)
}