Skip to content

Release 1.4.0 - #18

Merged
wf9a5m75 merged 26 commits into
mainfrom
develop
Nov 13, 2026
Merged

wf9a5m75 merged 26 commits into
mainfrom
develop

Conversation

@wf9a5m75

Copy link
Copy Markdown
Contributor

Merges develop into main for the 1.4.0 release.

Same as the Drawable overload, with the image given as a URL that core loads
(GroundImageState(bounds, imageUrl)).
Add a GroundImage(bounds, imageUrl) overload
…ike their states

The component form and the state form of the same overlay drew differently
when nothing was passed: Circle and GroundImage components used
strokeWidth 2 / opacity 0.5 while their states used 1 / 1.0, and PolygonState
used strokeWidth 2 while the Polygon component used 1.

Defaults are now the same for both forms on React, Android and iOS:
Circle / Polygon / Polyline strokeWidth = 1, GroundImage opacity = 1.0.
Unify shape defaults (Circle/Polygon stroke 1, GroundImage opacity 1.0)
InfoBubble(marker) and InfoBubbleCustom registered the entry built on
first composition inside DisposableEffect(marker) (Custom: marker,
tailOffset). The entry's icon is a value, so swapping marker.icon left
the bubble placed for the old icon: a pin scaled 2x was drawn over by its
own bubble.

All three overloads now go through RegisterInfoBubble: the entry is
remembered on what decides where the bubble goes (anchor, icon,
tailOffset) and is swapped only when one of those changes; its content
reads the latest lambda through rememberUpdatedState, so content and
colours follow without touching bubbleFlow. Disposal removes only the
entry this call put there.

Adds a JVM unit test that runs the Compose runtime on a no-node applier
(kotlinx-coroutines-test for Main, isReturnDefaultValues for
android.os.Trace).
Make InfoBubble follow the marker's icon and keep its entry stable
The Compose BaseMapViewSaver, which every android-for-* saver extends,
did not save uiSettings, so after a rotation every gesture flag came back
true. It now saves uiSettings and camera paddings through core's
MapViewStateBundle. Adds a device round-trip test.
Save uiSettings and camera paddings across configuration changes
Same shape as Markers(states): diffs the list against the ids this call
added last time and publishes the result in one collector update, so
several Polygons()/Polygon() can share a map.
MapViewBase destroyed the controller on dispose but nobody destroyed the
SDK's map view. Its render thread kept the view, and through the camera
listeners the old controller with every overlay, so each provider switch
left the previous map in memory until the app ran out of it.

MapViewBase now takes onDestroyMapView. On dispose it destroys the
controller, detaches the view and hands it to the provider once. This
also runs for a configuration change: the old Activity's view is never
shown again, and what survives a rotation is the saved state. A provider
that does not pass it gets a warning in the log instead of a silent leak.

The previous signature stays as a hidden overload so code compiled
against it still links (same JVM descriptor; the .api line differs only
in the erased generic signature).
Some SDKs keep what a map view holds -- lifecycleScope coroutines,
observers, component callbacks -- until the lifecycle they were given (or
found in the view tree) is destroyed. With the Activity's, a map the user
switched away from stays until the Activity goes. MapViewLifecycleOwner
follows the host lifecycle and can be ended on its own from
onDestroyMapView.
MapViewBase now hands the controller it destroyed back to the state
(MapViewState.detachController), so a state the app keeps no longer holds
the old map's controller and overlays. Done here for every provider; ArcGIS
did it on its own before.

The hidden overload without onDestroyMapView is removed: code compiled
against it has to be rebuilt (binary break, accepted).
…tions

A cycle through every provider (Boston parcels) still kept two old maps:

- ArcGIS 2D: the example hands the same MapViewBase a second state for a
  frame (ArcGIS 3D and 2D share a state type), the provider attached the
  controller to that one, and dispose detached it from the first. MapViewBase
  now remembers the state current when the controller was made and asks it,
  the latest and the first to let go (each only if it is still attached).
- Mapbox: the VectorStyleMutationSupport store left in the state's registry
  holds the map's holder and controller. MapViewBase removes it with the
  other two capabilities it already took down.
A change that adds API to core and uses it here is opened as a pair of
PRs on branches of the same name. CI always built core's default branch,
so the compose PR failed until core was merged (fix/mapview-teardown:
detachController(controller) not found). Use core's same-named branch
when it exists; otherwise the default branch, as before.
Release the map view and detach the controller when MapViewBase leaves
Add Polygons(states) for registering many polygons at once
Polylines() is Polygons() for lines: it diffs the list against the ids it added
last time and publishes one collector update, so several Polylines()/Polyline()
share a map. PolylineTiling() sets the map's polyline tiling (MapViewScope.
polylineTilingOptions), read when the polylines are handed over.
Add Polylines(states) and PolylineTiling(options)
Support bulk Circles with raster tiles
… Polygons

A list of thousands shows nothing until it is drawn; these say the work is going on.
They count the states a list brings by the same moment as each state's onAdded,
report progress at most every 100 ms, and start over when a new list adds states.
The same as the js-sdk-react collections.
Add onAddStart/onAddProgress/onAddEnd to Markers, Circles, Polylines, Polygons
@wf9a5m75
wf9a5m75 merged commit 187a26b into main Nov 13, 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