Skip to content

fix: render legacy bridge point markers visible#1726

Open
jamesarich wants to merge 1 commit into
googlemaps:mainfrom
jamesarich:fix/bridge-invisible-point-markers
Open

fix: render legacy bridge point markers visible#1726
jamesarich wants to merge 1 commit into
googlemaps:mainfrom
jamesarich:fix/bridge-invisible-point-markers

Conversation

@jamesarich

@jamesarich jamesarich commented Jul 16, 2026

Copy link
Copy Markdown

Fixes #1723 🦕

Every point feature added through the deprecated GeoJsonLayer/KmlLayer classes rendered fully transparent in 5.0.0: GeoJsonLayer.toModelFeature hardcoded PointStyle(color = 0), and KmlLayer passed KmlStyle.mMarkerColor — a hue in 0..360 — as if it were ARGB. Either way the color's alpha byte was 0, and MapViewRenderer derives the marker's alpha from that channel (markerOptions.alpha(Color.alpha(it.color) / 255f)).

Change:

  • GeoJsonLayer encodes the legacy point style's alpha into an otherwise-black color (hue 0 keeps the classic default-marker look).
  • KmlLayer converts the marker hue to opaque ARGB via Color.HSVToColor, falling back to opaque black when no style is present.

Tests: two new Robolectric regression tests (GeoJsonLayerMarkerVisibilityTest, KmlLayerMarkerVisibilityTest) asserting the captured MarkerOptions.alpha == 1f for a plain point feature/placemark through each bridge. Full :data:testDebugUnitTest suite passes.

Noted in #1723 but intentionally out of scope here: KmlLayer.toLegacyStyle never maps IconStyle color into mMarkerColor, so parsed KML marker colors are currently unused — happy to follow up on that separately if wanted.


Developed with AI assistance (Claude Code); the analysis, fix, and tests were reviewed and run locally by the author before submission.

The GeoJsonLayer and KmlLayer bridges built the renderer PointStyle with
broken color values: GeoJsonLayer hardcoded color = 0, and KmlLayer passed
KmlStyle.mMarkerColor — a hue in 0..360 — as if it were ARGB. In both
cases the color's alpha channel was 0, and MapViewRenderer derives the
marker's alpha from that channel, so every point feature added through the
deprecated KML/GeoJSON layer classes rendered fully transparent.

GeoJsonLayer now encodes the legacy point style's alpha into the color
(hue 0 keeps the default marker look), and KmlLayer converts the marker
hue to an opaque ARGB color via Color.HSVToColor, falling back to opaque
black when no style is present.
@google-cla

google-cla Bot commented Jul 16, 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.

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.

Point markers rendered invisible (alpha 0) through the legacy GeoJsonLayer/KmlLayer bridges

2 participants