Skip to content

Keep the map design across configuration changes - #11

Merged
wf9a5m75 merged 1 commit into
developfrom
fix/saver-state
Nov 7, 2026
Merged

wf9a5m75 merged 1 commit into
developfrom
fix/saver-state

Conversation

@wf9a5m75

@wf9a5m75 wf9a5m75 commented Nov 7, 2026

Copy link
Copy Markdown
Contributor
  • TomTomMapView never applied the state's design to the map (it used the
    MapOptions default) and the controller's default (Standard) was reported
    to the state on listener attach, so a passed-in or restored design became
    Standard. The design is applied first, then the listener attached.
  • The saver kept only the id; Custom designs (StyleDescriptor) and
    attribution rules were lost. It now saves the descriptor (Parcelable).
  • Device round-trip test.

After a configuration change (screen rotation) the map state now keeps its design (id, style, attribution rules), uiSettings and camera paddings. Depends on android-sdk-core MapViewStateBundle; merge order core → compose → providers. Verified by rotating a Lenovo tablet (HA26Z6JL); instrumented tests pass the saved Bundle through a real Parcel.

- TomTomMapView never applied the state's design to the map (it used the
  MapOptions default) and the controller's default (Standard) was reported
  to the state on listener attach, so a passed-in or restored design became
  Standard. The design is applied first, then the listener attached.
- The saver kept only the id; Custom designs (StyleDescriptor) and
  attribution rules were lost. It now saves the descriptor (Parcelable).
- Device round-trip test.
@wf9a5m75
wf9a5m75 merged commit 7a5b0e2 into develop Nov 7, 2026
2 checks passed
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.

1 participant