Skip to content

feat(clustering): add 4-arg convenience constructor and clean up parameter naming - #1824

Closed
dkhawk wants to merge 2 commits into
mainfrom
feat/cluster-manager-convenience-constructor
Closed

dkhawk wants to merge 2 commits into
mainfrom
feat/cluster-manager-convenience-constructor

Conversation

@dkhawk

@dkhawk dkhawk commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

This PR proposes a couple of improvements to #1822:

  1. 4-argument convenience constructor:
    Adds a constructor (context: Context, map: GoogleMap, mainContext: CoroutineContext, backgroundContext: CoroutineContext) that defaults markerManager to MarkerManager(map). This is especially useful for developers injecting dispatchers (such as in tests or DI frameworks) who don't need a custom MarkerManager.
  2. Parameter naming cleanup:
    Renames constructor parameter mMap -> map to adhere to modern Kotlin coding conventions, while retaining the backing property private val mMap for compatibility.
  3. Unit tests & ABI dump:
    Adds a unit test validating the 4-arg constructor with test dispatchers, cleans up MockK verifications with clearMocks(), and updates clustering.api.

@dkhawk
dkhawk requested a review from kikoso October 19, 2026 21:07
@googlemaps-bot

Copy link
Copy Markdown
Contributor

Code Coverage

Overall Project 60.64% 🍏
Files changed 100% 🍏

Module Coverage
Kover Gradle Plugin XML report for :clustering 33.93% 🍏
Files
Module File Coverage
Kover Gradle Plugin XML report for :clustering ClusterManager.kt 81.21% 🍏

Base automatically changed from feat/cluster-manager-dispatchers to main October 20, 2026 17:18
@dkhawk dkhawk closed this Oct 20, 2026
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.

3 participants