I have a map implemented with Google Maps and I use a MarkerComposable to create a custom marker. So far, so good. But I need to add a small elevation with its shadow, and even though I pass it as a modifier, on the map it appears without the shadow. If I do it on a surface, the shadow is shown, so could it be that the GoogleMap composable doesn't allow adding shadows to markers?
I have seen this pending issue: https://github.com/googlemaps/android-maps-compose/issues/398
Thanks in advance!
// ...
MarkerComposable(
keys = arrayOf(isSelected),
state = MarkerState(location.toLatLng()),
onClick = { _ ->
onMarkerClick()
false
},
) {
Image(
painter = painterResource(painter),
contentDescription = null,
modifier = Modifier.shadow(elevation = 5.dp) // Doesn't show the shadow
)
}
// ...