Skip to content

fix: restore isLayerOnMap() as abstract member of Layer - #1748

Merged
dkhawk merged 1 commit into
mainfrom
fix/1746-layer-islayeronmap
Aug 11, 2026
Merged

fix: restore isLayerOnMap() as abstract member of Layer#1748
dkhawk merged 1 commit into
mainfrom
fix/1746-layer-islayeronmap

Conversation

@kikoso

@kikoso kikoso commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Prior to the v5 rewrite, Layer exposed isLayerOnMap() directly. The rewrite (feat!: rewrite android maps utils #1658) kept addLayerToMap()/removeLayerFromMap()/getMap()/setMap() as abstract members of Layer, but dropped isLayerOnMap() from the base class, leaving it duplicated identically in GeoJsonLayer and KmlLayer with no way to call it through a Layer reference.
  • Adds public abstract fun isLayerOnMap(): Boolean to Layer and marks the existing implementations in GeoJsonLayer/KmlLayer as override. No behavior change — the two implementations were already identical.

Fixes #1746

Test plan

  • Added GeoJsonLayerOnMapTest and KmlLayerOnMapTest, verifying isLayerOnMap() is reachable through a Layer-typed reference and reflects addLayerToMap()/removeLayerFromMap() calls.
  • ./gradlew :data:testDebugUnitTest — all 124 tests in the data module pass.
  • ./gradlew :data:compileDebugKotlin — compiles cleanly.

The v5 rewrite dropped isLayerOnMap() from the Layer base class while
keeping it as separate identical implementations in GeoJsonLayer and
KmlLayer, so callers holding a Layer reference lost access to it.

Fixes #1746
@googlemaps-bot

Copy link
Copy Markdown
Contributor

Code Coverage

Overall Project 43.14% 🍏
Files changed 100% 🍏

Module Coverage
data 49.42% 🍏
Files
Module File Coverage
data GeoJsonLayer.kt 59.15% 🍏
Layer.kt 50% 🍏
KmlLayer.kt 30.91% 🍏

@dkhawk
dkhawk merged commit ddc283c into main Aug 11, 2026
12 checks passed
@dkhawk
dkhawk deleted the fix/1746-layer-islayeronmap branch August 11, 2026 15:45
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.

isLayerOnMap() missing in Layer

3 participants