Repository navigation
fix: AdvancedMarker pinConfig, pending camera moves and Street View source - #1046
Merged
Merged
Conversation
…ource - AdvancedMarker: a null icon no longer overwrites the pinConfig icon during composition. The update blocks now resolve the icon with the same precedence as the factory (pinConfig over icon). - CameraPositionState: setting position while no map is bound now cancels a pending move() or animate(), as the KDoc says, so it is not overwritten when the map binds. - StreetViewCameraPositionState: setPosition forwards source when radius is null instead of dropping it.
kikoso
marked this pull request as ready for review
October 20, 2026 04:17
Coverage (unit tests)Compared against
Line and branch coverage from unit test reports. History is recorded on the |
Contributor
Coverage (instrumentation tests)
Files
|
dkhawk
approved these changes
Oct 20, 2026
This was referenced Oct 20, 2026
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.
Three small bug fixes in
maps-compose, each with a JVM unit test.AdvancedMarker drops
pinConfigon first compositionWhen the node is inserted,
update(icon)ran afterupdate(pinConfig). Withicon == nullit calledsetIcon(null)and replaced the PinConfig glyph with the default pin. This hit the commonAdvancedMarker(state, pinConfig = ...)case (README example,AdvancedMarkersActivity). Both update blocks now resolve the icon throughadvancedMarkerIcon(), which uses the factory's precedence (pinConfig over icon), so a null icon no longer overwrites a set pinConfig.Setting
positionbefore the map binds did not override a pendingmove()/animate()With no map bound, the
positionsetter only wroterawPosition. When the map bound,setMap()moved to the new position and then ran the stale pending move or animation, overwriting it. That contradicts themove()andanimate()KDoc. The setter now cancels the pending callback and clearsmovementOwner.StreetViewCameraPositionState.setPositiondroppedsourcewithoutradiussetPosition(latLng, source = OUTDOOR)fell through tosetPosition(latLng). It now callsStreetViewPanorama.setPosition(LatLng, StreetViewSource).Tests
maps-composehad no unit tests.FakeMapsSdk.ktadds smalljava.lang.reflect.Proxyfakes of the SDK delegate interfaces (IGoogleMapDelegate,IStreetViewPanoramaDelegate,ICameraUpdateFactoryDelegate) that record calls, so these run on the JVM with no new dependencies. I checked that the camera and Street View tests fail without their fixes../gradlew :maps-compose:testDebugUnitTest: 10 tests pass./gradlew :maps-compose:lintDebug: no new issues (existingPotentialBehaviorOverridewarnings inMapApplier.kt)BEGIN_COMMIT_OVERRIDE
fix(markers): keep the pinConfig icon on AdvancedMarker when icon is null
fix(camera): setting position while unbound cancels a pending move or animation
fix(streetview): forward source in setPosition when radius is null
END_COMMIT_OVERRIDE