You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In 5.0.0, every point feature added through the deprecated GeoJsonLayer or KmlLayer classes renders fully transparent. The markers exist (they occupy tap targets) but are invisible.
Expected behavior
Point features render as visible markers (the default marker when unstyled), as they did in 4.x.
Observed behavior
Markers are added with alpha = 0. Two related root causes in the bridges' toModelFeature:
GeoJsonLayer hardcodes PointStyle(color = 0, …).
KmlLayer passes inline?.mMarkerColor?.toInt() ?: 0 — but KmlStyle.mMarkerColor is a hue (0..360), not an ARGB color, so even a styled placemark produces a value whose alpha byte is 0.
MapViewRenderer.createMarkerOptions then derives the marker's alpha from the style color's alpha channel:
val geoJson ="""{"type":"Feature","geometry":{"type":"Point","coordinates":[-111.62,41.942]}}"""val layer =GeoJsonLayer(map, JSONObject(geoJson))
layer.addLayerToMap() // marker is added but invisible
Same with any KML <Placemark><Point> through KmlLayer.
Related smaller gap noticed while debugging: the KML bridge's toLegacyStyle maps IconStyle scale/href/hotSpot but not IconStyle color, so mMarkerColor is never populated from parsed KML at all.
I have a fix ready (GeoJsonLayer encodes the legacy style's alpha into the color; KmlLayer converts the hue via Color.HSVToColor, defaulting to opaque black) with Robolectric regression tests asserting MarkerOptions.alpha == 1f — PR incoming.
Summary
In 5.0.0, every point feature added through the deprecated
GeoJsonLayerorKmlLayerclasses renders fully transparent. The markers exist (they occupy tap targets) but are invisible.Expected behavior
Point features render as visible markers (the default marker when unstyled), as they did in 4.x.
Observed behavior
Markers are added with
alpha = 0. Two related root causes in the bridges'toModelFeature:GeoJsonLayerhardcodesPointStyle(color = 0, …).KmlLayerpassesinline?.mMarkerColor?.toInt() ?: 0— butKmlStyle.mMarkerColoris a hue (0..360), not an ARGB color, so even a styled placemark produces a value whose alpha byte is 0.MapViewRenderer.createMarkerOptionsthen derives the marker's alpha from the style color's alpha channel:Environment details
datamodule, introduced by the v5 rewrite feat!: rewrite android maps utils #1658)Steps to reproduce
Same with any KML
<Placemark><Point>throughKmlLayer.Related smaller gap noticed while debugging: the KML bridge's
toLegacyStylemapsIconStylescale/href/hotSpot but notIconStylecolor, somMarkerColoris never populated from parsed KML at all.I have a fix ready (GeoJsonLayer encodes the legacy style's alpha into the color; KmlLayer converts the hue via
Color.HSVToColor, defaulting to opaque black) with Robolectric regression tests assertingMarkerOptions.alpha == 1f— PR incoming.