Skip to content

Release 1.4.0 - #26

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

wf9a5m75 merged 50 commits into
mainfrom
develop

Conversation

@wf9a5m75

Copy link
Copy Markdown
Contributor

Merge develop into main for the 1.4.0 release.

* Make bearing a clockwise map rotation

bearing を「値を増やすと地図が時計回りに回る」向きに統一し、ネイティブ SDK との変換をコアの CameraBearing に集約する。

* ci: build the core module from the matching branch

コアの未マージ/未リリースな変更に追随する PR を、コアが先に取り込まれるのを待たずに検証できるようにする。同名ブランチが無ければ従来どおり既定のコアを使う。

* fix: point material3 at its own version line

material3 は compose-ui とは別のバージョン系列で、composeLibs(1.7.8)を流用すると存在しない material3:1.7.8 を要求して sample-app のクラスパスごと解決に失敗する。集約ビルド(android-sdk)の catalog と同じ 1.4.0 に合わせる。
MarkerTilingOptions.declutterPx existed and samples set it, but every
controller dropped it on the floor when constructing MarkerTileRenderer,
so the renderer ran with 0 and drew every marker on every tile. On a
slow device that is the difference between an overview tile costing
538ms and 79ms (SO-02L, 144k markers, z10, MarkerTileRenderBenchmark) --
and the drawn result now actually matches what iOS and react show for
the same options.
MTMapReferenceStyle.CUSTOM pointed at the blank style bundled by android-sdk-core.
* feat: integrate vector style support and pending map fixes

* Keep each file's line endings as they are on develop

The checkpoint commit rewrote whole files between LF and CRLF, which buried
its real changes under line-ending noise. Content is unchanged.
ImageIcon(imageUrl = ...) keeps the same instance when its image arrives;
only its hashCode changes, and MarkerState makes the icon read recompose.
Key the remembered bitmap on the hash as well, or the overlay keeps the
transparent placeholder.
MarkerState.icon no longer reads Compose state; iconRevision is the counter
that goes up when a URL icon's image arrives. Reading it also makes the
overlay recompose then.
Redraw a marker when its URL icon's image arrives
The saver kept only the id and restored through fromId, so custom styles
or variants became Streets and attribution rules were lost. It now saves
the reference style (or custom URL), variant and rules. Adds a device
round-trip test.
Keep the map design across configuration changes
The polygon controller gets a PolygonTiler, whose tiles are shown through
the raster layer path the marker tiles use (upsert / removeById, outside
the app's RasterLayer composition). Tiled polygons stay registered for taps
and give the map SDK nothing.

reapply skips tiled entities, which have no handle. A raster whose source
changes is added again under new ids: MapTiler had not applied the removal
yet, so the add failed with "Source already exists" and the layer
disappeared -- after the first tap on a tiled polygon, here.
MarkerState.onAdded asks hasMarker once per marker after every composition;
a linear scan made that quadratic (1e5 markers, 1e10 comparisons).
MTMapView destroys its WebView, but nothing destroyed MapTilerMapViewController:
its tile-server routes, overlay managers and coroutine scope stayed. It is
now destroyed with the WebView it belongs to, also when a design change
replaces it.
The state kept its own controller field, set on attach and never cleared, so
a state the app keeps held the destroyed controller and every overlay of the
old map. It now reads the base's attached controller, which MapViewBase
detaches when the map is torn down.
The MapTiler SDK hands a layer to the page well after MTStyle.addLayer
returns (a coroutine, then the SDK's queue until the map's next idle), so
onAdded came while the map showed nothing: Boston's 604 downtown polygons
reported it 0.1 s after the hand-over and reached the map 15 s later.
The renderers' onAdd (polygon, polyline, circle, ground image, raster --
and so the polygon and marker tiles) now return once the page's map has
their layers (PageLayerWait), asked through the bridge.

Removal went by id only, which left the id in MTStyle's own record: adding
the same id again failed with "Layer already exists" and drew nothing, so
Downtown after City parcels showed no polygons while reporting onAdded.
The layer and source objects are now removed, which clears both.
This provider does not go through MapViewBase, which does it for the others;
a state the app keeps held the destroyed controller and its overlays. Only
if it is still the attached one, so a design change keeps the new one.
clearOverlays() cleared the shape and raster controllers and the
marker tiles, but not the list of markers drawn as overlays
(MapTilerMarkerOverlay), so markers below the tiling threshold stayed
on the map after clearOverlays() (seen on the tablet). It now empties
that list first, as the Longdo controller does.
Release the map view and the controller when the map leaves the composition
Remove overlay markers in clearOverlays()
Markers drawn through a StrategyMarkerController (clustering and other
extension modules register these with registerOverlayController) were left
on the map by clearOverlays(), which only cleared this provider's own
controllers. Call BaseMapViewController.clearStrategyMarkerControllers().

Needs android-sdk-core with clearStrategyMarkerControllers()
(fix/clear-strategy).
Overlays removed from a MapTiler map - a polygon, circle, raster layer,
ground image or polyline taken out of the composition, or everything after
clearOverlays() - did not come back when added again with the same id.
MTStyle remembers every source and layer it added, by id, and refuses to
add the same id again (SourceAlreadyExists / LayerAlreadyExists, which the
renderers caught and logged). removeSourceById / removeLayerById only
remove them from the page and leave that record behind; removeSource /
removeLayer clear it too.

Remove by object everywhere the renderers take a source or layer out,
falling back to the id when MTStyle has no record of it (its add records
asynchronously). The same applies to the background layer the vector-style
mutation target adds and removes. A raster layer whose source changes is
removed and re-added under the same ids, so that path was broken too.

MapTilerStyleRemovalTest drives a real MTStyle through a recording command
executor: removing by id leaves the id recorded; removing by object lets
the same id be added again.
MTStyle.addLayer has no beforeId and always appends, so overlays were
stacked in add order, and after a style reload in the reapply order
(raster, polyline, polygon, circle, ground image).

MapTilerOverlayStacking keeps the SDK layers' order per style and moves
each new layer below the lowest SDK layer with a higher key. Reapply now
runs in band order after resetting the record. The SDK cannot list the
basemap's layers, so rasters sit above the basemap including its labels.

MTStyle.addLayer does not reach the page right away: for anything but an
image source it first waits for an isSourceLoaded round trip, and if the
source is not loaded yet it holds the layer until the next idle. A
moveLayer sent right after addLayer then arrives before the layer and does
nothing (adding in reverse order left the raster on top, and a zIndex 0
polygon above a zIndex 1 one). So after an add, the recorded order is sent
again on the next two idle events (onIdle, from onEventTriggered; launched
once on the main dispatcher so it lands after the SDK flushes its queue).

Stacking order (all providers, all platforms), bottom to top: raster
layers < ground images < polygons < circles < polylines < markers.
Needs android-sdk-core with OverlayStacking (fix/overlay-stacking-order).
Remove style layers and sources by object so they can come back
Clear strategy markers in clearOverlays()
Raster layers keep a new id per source replacement (this branch) and are
stacked by band (develop). The polygon tiles go at the bottom of the polygon
band.
Additions only: the polygon tiles' stacking key, and declarations develop
added without running apiDump (TILE_REFRESH_COALESCE, and on ArcGIS the
marker controller's constructor that takes a boolean).
develop (through feat/polygon-tiling) brought MapTilerStyleRemoval's
removeLayerAndForget / removeSourceAndForget, the same as this branch's
removeOwnedLayer / removeOwnedSource. The renderers use develop's, with its
stacking bookkeeping, and the copies here are gone.
Additions only (this branch had not run apiDump); in core, one member moved.
Draw large polygon sets as raster tiles (PolygonTiler)
The polyline controller gets a PolylineTiler, shown through the same raster
layer path as the polygon tiles. Stacking key (Polyline, Int.MIN_VALUE): over circles, under native polylines and markers.
Whatever redraws from the polyline manager skips tiled entities (no native line).
Draw large polyline sets as raster tiles (PolylineTiler)
Support bulk Circles with raster tiles
Compose draws later children on top and the overlays followed the
published list (add order). They are now sorted by zIndex, then south
and west.
Same-zIndex overlays follow the screen position (lower in front), using
rememberMarkerDrawOrderFrame so they are re-sorted once rotation settles.
Stack markers by the shared draw order
setPadding is not part of the camera options and jumps when set, so
paddings are emulated by moving the camera center and undone on read;
the holder's synchronous projection centers on the moved camera. fov is
36.87 (MapLibre GL JS). On TB520FU the engine's unproject of the padded
center lands within 1.1 m of the target at tilt 0 and 60.
Report camera fov and apply paddings
2.3.0-2.5.0 only add API (EU endpoints, estimation, MTLayerQuery); the removed MTOfflineCoverage* classes are not used here. The bundled MapLibre GL JS goes from 5.21.1 to 5.24.0. Compiles unchanged; checked on device: all 16 designs, markers and draw order, tile markers, shapes, raster, InfoBubble, gestures, and centre-shift paddings at tilt 0/60 (same read-back as 2.2.2).
toScreenOffset / fromScreenOffsetSync ignored tilt, so InfoBubbles, marker animations and tile-marker hit tests drifted on a tilted map (up to 114 px from the engine's own project() at tilt 60 near the centre, 247 px at a padded centre). With the fov they match the engine within 0.4 px at tilt 0/30/60 and bearing 0/±90 on the TB520FU. Needs android-sdk-core fix/screen-projection-tilt.
Pass the camera's field of view to the screen projection
@wf9a5m75
wf9a5m75 merged commit 8cdb0c9 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