feat(collections): introduce unified OverlayManager and polymorphic MapOverlay system - #1767
Draft
dkhawk wants to merge 2 commits into
Draft
feat(collections): introduce unified OverlayManager and polymorphic MapOverlay system#1767dkhawk wants to merge 2 commits into
dkhawk wants to merge 2 commits into
Conversation
…les and apply optimizations
Collaborator
|
A Do we want to update? It will be a breaking change, which is also fine IMO |
dkhawk
force-pushed
the
chore/lint-fixes
branch
from
August 27, 2026 21:34
47e2e74 to
7155097
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This draft PR introduces an alternate, polymorphic map object collection architecture under
com.google.maps.android.collections.overlaydesigned for idiomatic Kotlin usage, heterogeneous layer grouping, and future Kotlin Multiplatform (KMP) readiness while maintaining 100% coexistence and backward compatibility with the existing collection managers.Polymorphic Abstraction Hierarchy (
MapOverlay<T>):isVisible,zIndex,tag,remove()).MarkerOverlay,CircleOverlay,PolygonOverlay,PolylineOverlay,GroundOverlayOverlay.marker.onClick { ... },marker.onDrag { ... },marker.onInfoWindowClick { ... }).Heterogeneous
OverlayCollection:add(options)and operator+=syntax.showAll(),hideAll(),clear(),isVisible = false).collection.markers,collection.polylines,collection.polygons, etc.).Coexistence with Legacy Managers:
OverlayManagercan run standalone or share listeners with existingMarkerManager,CircleManager,PolygonManager,PolylineManager, andGroundOverlayManagerinstances on the same map without listener collisions.Unit Test Suite with Google Truth:
OverlayManagerTest,OverlayCollectionTest,MapOverlayTest).Verification
./gradlew test lint assemble jacocoTestDebugUnitTestReport— all 265 test suites passed.:libraryat 88.24%).Reviewer
cc @LoyalAbbas