Skip to content

feat: add polygon z-index support to PolygonStyle/MapViewRenderer - #1785

Merged
dkhawk merged 1 commit into
googlemaps:mainfrom
simonbility:feature/polygon-zindex
Sep 18, 2026
Merged

dkhawk merged 1 commit into
googlemaps:mainfrom
simonbility:feature/polygon-zindex

Conversation

@simonbility

Copy link
Copy Markdown
Contributor

Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open a GitHub issue as a bug/feature request before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Edit the title of this pull request with a semantic commit prefix (e.g. "fix: "), which is necessary for automated release workflows to decide whether to generate a new release and what type it should be.
  • Will this cause breaking changes to existing Java or Kotlin integrations? If so, ensure the commit has a BREAKING CHANGE footer so when this change is integrated a major version update is triggered. See: https://www.conventionalcommits.org/en/v1.0.0/
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #1784 🦕

@google-cla

google-cla Bot commented Sep 18, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@saitanallensantiago26-beep

Copy link
Copy Markdown

Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open a GitHub issue as a bug/feature request before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Edit the title of this pull request with a semantic commit prefix (e.g. "fix: "), which is necessary for automated release workflows to decide whether to generate a new release and what type it should be.
  • Will this cause breaking changes to existing Java or Kotlin integrations? If so, ensure the commit has a BREAKING CHANGE footer so when this change is integrated a major version update is triggered. See: https://www.conventionalcommits.org/en/v1.0.0/
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #1784 🦕

@kikoso kikoso left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dkhawk
dkhawk merged commit 9056fd9 into googlemaps:main Sep 18, 2026
12 checks passed
@simonbility
simonbility deleted the feature/polygon-zindex branch September 18, 2026 16:33
@simonbility

Copy link
Copy Markdown
Contributor Author

Thanks everyone

dkhawk added a commit that referenced this pull request Sep 18, 2026
…demo

Follow-up to #1785 to complete z-index support across the remaining geometry
styles (PointStyle, LineStyle), layer mappers (GeoJsonLayer, KmlLayer), and add
an interactive demo and visual regression test suite.

Key changes:
- Model Layer: Add zIndex property (default 0.0f) to PointStyle and LineStyle with KDoc.
- Renderer Engine: Propagate style.zIndex to MarkerOptions, AdvancedMarkerOptions, and PolylineOptions in MapViewRenderer.
- Layer Bridges: Forward getZIndex() in GeoJsonLayer and inline zIndex in KmlLayer when converting to platform-agnostic models.
- Interactive Sample: Add ZIndexDemoActivity showcasing in-place zIndex updates and reset for overlapping polygons, polylines, and markers with Material 3 filled tonal icon buttons and reset action.
- Testing:
  - Unit tests verifying z-index propagation in MapViewRendererTest, GeoJsonLayerObserverTest, and KmlLayerOnMapTest.
  - On-device visual regression test (ZIndexVisualTest) verifying initial stacking hierarchy, dynamic updates, and reset action.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow specifying z-index via PolygonStyle

4 participants