googlemaps / android-maps-compose

Jetpack Compose composables for the Maps SDK for Android
https://developers.google.com/maps/documentation/android-sdk/maps-compose
Apache License 2.0
1.14k stars 135 forks source link

No shadows appear when creating custom cluster icons using composables #398

Open y9san9 opened 12 months ago

y9san9 commented 12 months ago

Expected result: Shadows draw normally:

Screenshot 2023-09-13 at 16 27 30

Actual result: Shadows do not draw:

Screenshot 2023-09-13 at 16 33 15

Composable used in two cases: https://yaso.su/GuR06AbK

wangela commented 12 months ago

If you would like to upvote the priority of this issue, please comment below or react on the original post above with :+1: so we can see what is popular when we triage.

@y9san9 Thank you for opening this issue. 🙏 Please check out these other resources that might help you get to a resolution in the meantime:

This is an automated message, feel free to ignore.

ln-12 commented 10 months ago

I am experiencing the same issue when adding a custom marker which contains of a card with elevation.

The code is:

MarkerComposable(
    state = MarkerState(position = LEIPZIG_LATLNG),
) {
    Card(
        elevation = CardDefaults.cardElevation(
            defaultElevation = 10.dp
        ),
        modifier = Modifier.padding(4.dp)
    ) {
        Text(text = "SOME TEXT", modifier = Modifier.padding(4.dp))
    }
}

Which renders like this in the preview:

image

But looks like this on the map:

image

And I noticed that not only outer shadows are missing, but also shadows within my compose view.

y9san9 commented 7 months ago

Is there any workaround?

leontodd commented 5 months ago

Same issue here. I also tried drawing the shadow with graphicsLayer instead and it doesn't work, which is strange because other graphicsLayer parameters work but shadowElevation does not.

yasintanriverdi commented 1 week ago

Any update on this?