Skip to content

feat: add rotation support to cluster item API#943

Merged
dkhawk merged 5 commits into
mainfrom
feat/cluster-item-rotation
Jul 10, 2026
Merged

feat: add rotation support to cluster item API#943
dkhawk merged 5 commits into
mainfrom
feat/cluster-item-rotation

Conversation

@kikoso

@kikoso kikoso commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

Add rotation parameter support to the cluster item API, allowing users to customize marker rotation for both clustered and non-clustered items.

Changes

  • Added rotation field to ClusteringMarkerProperties
  • Added clusterContentRotation and clusterItemContentRotation parameters to all Clustering() functions
  • Updated rememberClusterRenderer() to accept and apply rotation parameters
  • Rotation is applied via markerOptions.rotation() just like regular markers

Testing

  • Project builds successfully with no compilation errors
  • Changes follow the same pattern as existing anchor and zIndex support

Closes

Closes #942

Add rotation parameter to ClusteringMarkerProperties and Clustering functions, allowing per-item and default rotation customization for both cluster and cluster item markers. This follows the same pattern as the existing anchor and zIndex support added in v8.1.0.

Closes #942
@googlemaps-bot

googlemaps-bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Code Coverage

Overall Project 25.98% -6.23%
Files changed 0%

File Coverage
Demo.kt 0% -0.89%
MarkerClusteringRotationActivity.kt 0%

dkhawk added 2 commits July 10, 2026 14:17
…ve in ComposeUiClusterRenderer

- Add snapshotFlow observer in ComposeUiClusterRenderer to dynamically update active Marker rotation, anchor, and zIndex across parent recompositions.
- Override invalidate in InvalidatingComposeView to ensure ClusteringMarkerProperties updates trigger re-rendering.
- Add MarkerClusteringRotationActivity sample demonstrating top-level vs property rotation with dead-center Offset(0.5f, 0.5f) anchoring.
- Add GoogleMapViewClusteringTests instrumentation test suite.
…iClusterRenderer (#943)

- Inspect child properties in onBeforeClusterRendered and onBeforeClusterItemRendered to set anchor, zIndex, and rotation upon initial marker creation.
- Replace linear ViewKey scans in keysToViews with direct O(1) hash map lookups.
- Change ViewInfo.view type to InvalidatingComposeView for type safety.
- Import snapshotFlow directly to clean up fully-qualified names in init block.

TAG=agy
CONV=8ec3e54a-53d3-485c-b062-b6f1a534729e
@dkhawk dkhawk merged commit 3430231 into main Jul 10, 2026
13 checks passed
@dkhawk dkhawk deleted the feat/cluster-item-rotation branch July 10, 2026 21:49
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.

Add rotation support to cluster item API

3 participants