Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to render GroundOverlays on top of map content such as buildings #526

Open
zalexbag opened this issue Feb 16, 2024 · 4 comments
Open
Labels
triage me I really want to be triaged. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@zalexbag
Copy link

Is your feature request related to a problem? Please describe.
GroundOverlays always render below map content (specifically buildings that are enabled via isBuildingEnabled = true in MapProperties for instance) and there isn't any way to make GroundOverlays be rendered on top (i.e. their z index is always below everything else on the map).

Describe the solution you'd like
Add an API that offers the ability to for GroundOverlays to be rendered above other map content, and especially for buildings as that is needed for my team's use case where we want buildings to be drawn below our GroundOverlay image.

Describe alternatives you've considered
We tried working with the various shape APIs (Circle, Polygon, and Polyline) to see if any of those rendered above map content and found that none of those do either, though those also don't offer the same functionality we need which only GroundOverlay offers anyways.

Additional context
Below you can see examples of how buildings are always rendered on top of GroundOverlay, Circle, and Polygon:

GroundOverlay Circle Polygon
fpom-groundoverlay fpom-circle fpom-polygon
@zalexbag zalexbag added triage me I really want to be triaged. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. labels Feb 16, 2024
@wangela
Copy link
Member

wangela commented Feb 16, 2024

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

@zalexbag 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.

@lucanicoletti
Copy link

Have you tried specifying the zIndex in the GroundOverlay function to be higher than 0f(the default)?

@zalexbag
Copy link
Author

zalexbag commented Mar 6, 2024

@lucanicoletti yes I did test changing the zIndex to a few different non-zero values including Float.MAX_VALUE and buildings still render on top of the GroundOverlay.

@zalexbag
Copy link
Author

zalexbag commented Mar 6, 2024

Oh and one other point of context to add to that, in the Maps Android SDK documentation for Shapes in the Z-index section they state the following:

The z-index specifies the stack order of this shape, relative to other overlays (other shapes, ground overlays and tile overlays) on the map. An overlay with a high z-index is drawn above overlays with lower z-indexes. Two overlays with the same z-index are drawn in an arbitrary order.

Note that markers are always drawn above other overlays, regardless of the z-index of the other overlays.

This is referring to shapes, but I would infer the behavior is the same for other overlay types and in this case for GroundOverlay. So the way I see it, the zIndex is meant to layer with regards to other overlays but has no effect when non-overlay elements are displayed like buildings or (as they mentioned) map markers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage me I really want to be triaged. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

3 participants