Skip to content

Release 1.4.0 - #24

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

wf9a5m75 merged 45 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.
A raster overlay was appended at the top of the style, above the place
names, road names and shields the backend draws. The vector tile
sample showed what that costs: our own roads run straight through the
district names, which reads as "the labels are drawn under the lines".
A heatmap or a satellite layer hid them outright.

Anchoring to the style's first symbol layer puts the overlay above the
basemap's geometry and below its labels, which is where a tile overlay
belongs. Inserting successive layers below the same anchor preserves
their order, so the z-order among our own raster layers is unchanged.

Our own layers are skipped when looking for the anchor: markers are a
symbol layer too, and anchoring to them would put the raster back above
the labels -- and only once a marker existed.

Marker tiles keep their own rule (below the marker symbol layer), so
native markers still draw above everything.
* 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.
MapplsRasterLayerController.reapplyStyle() read the manager outside the
controller lock and registered what it read again. Drop it and use the one in
android-sdk-core's RasterLayerController (MapConductor/android-sdk-core#17),
which runs under the lock.
Use the core reapplyStyle() for raster layers
Same change as android-for-maplibre: relabelling street trees changes a few
dozen tiled markers at once, and each update() replaced the raster source,
so the map fetched every visible tile again per marker (on MapLibre, Pixel 5a:
45 replacements, 494 tile renders, last tile 6.1 s after the change).

- Changes arriving within a frame share one tile refresh; a pending refresh is
  cancelled on destroy() so it cannot register the tile route again.
- The tiling check reads the entity count without copying all entities.
- The icon is baked only when the marker is drawn natively.
- onPostProcess runs only when a native marker became tiled (it copies every
  entity to redraw the native ones).
Redraw tiles once per burst of tiled-marker changes
MapplsMapViewSaver saved only styleName, so the id came back as "default"
and attribution rules were lost. Adds a device round-trip test.
Keep the whole 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.

The polygon tile layer goes where the SDK's polygon layers do: over the
basemap, under polylines and markers.
Nothing destroyed the MapView, so its render thread kept the old
controller with every overlay. It is now destroyed through MapViewBase's
onDestroyMapView (not stopped first: it was never started).
core's PolygonController.destroy() releases its tiler (02369fa), but this
provider's own polygon conductor does not extend it and its destroy() was
empty, so the tile server kept every destroyed map's tiled polygons.
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 polygon conductor's destroy() clears its polygon and outline managers,
as core's PolygonController now does.
MapplsPolygonConductor implemented SlottedOverlayController by hand because
it drives two renderers (fill + a polyline per outline, since a fill
layer cannot draw a stroke wider than 1 px). Every change to core's
PolygonController had to be copied over, and it was missed twice.

Replace it with MapplsPolygonController, which extends core's
PolygonController, and MapplsPolygonCompositeRenderer, which presents the
existing fill and outline renderers as one renderer. The fill renderer's
onRemove now redraws without the removed polygons, since core's clear()
does not call onPostProcess.
…change makes it untileable

Setting geodesic on a tiled polygon in place, or giving it points that span
half the world or fewer than three, kept it in the tiles. update() now checks
canTile and, when it fails, takes the polygon out of the tiles and draws it
natively. It stays on the map, so this is not an add.
The marker controller's clear() emptied the manager, but onRemove only
drops icon references; the GeoJSON source is rewritten from the manager
in onPostProcess, which clear() never called. The markers stayed on the
map after clearOverlays(). Call it once the manager is empty, the same
order the core controllers use.
Release the map view and the controller when the map leaves the composition
The conductor that develop's teardown change touched is gone here; its
destroy() cleared the polygon and outline managers. Core's PolygonController
now clears the polygon manager on destroy, and this controller clears the
outline renderer's manager on top.
Extend core PolygonController for polygons (drop hand-copied conductor)
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).
Before: circles were added first (bottom), polygon z-layers were
inserted below the polyline layer (so above circles), ground images
went directly below the polyline layer (above polygons, and above every
polygon added earlier), and a raster added after the style was set went
to the very top until the next rebuild put it under the labels.

MapplsOverlayStacking records the band and zIndex of every layer the
SDK adds and inserts each one below the lowest SDK layer with a higher
key, reading the style's current layer list every time. Rasters
additionally stay below the basemap's first label layer (as before).
Marker tiles go to the bottom of the marker band, the drag layer to the
top.

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).
Clear strategy markers in clearOverlays()
Stack overlays by band, independent of add order and style reloads
develop replaced the polygon conductor with a controller that extends core's
PolygonController, which already routes polygons through the tiler, moves an
untileable one to native drawing, and disposes the tiler on destroy. The
conductor's tiling is dropped with it; the fill renderer now leaves out the
tiled entities (no features) when it redraws.

The polygon tiles are stacked with OverlayStacking: at the bottom of the
polygon band (over raster layers and ground images, under circles, polylines
and markers), where the anchor list used to put them.
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).
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
The symbol sort key is now zIndex first, then south and west, recomputed
from the current state on every change. Unspecified markers in the
southern hemisphere no longer outrank an explicit zIndex.
Same-zIndex markers follow the screen position (lower in front) and are
re-sorted after rotation settles.
Stack markers by the shared draw order
Same as MapLibre: paddings go to the native camera padding (px) on move,
animate and the initial camera and are read back from it. fov is 36.87
(measured 36.9 on TB520FU).
Report camera fov and apply paddings
Native padding widens the frustum upward. Under tilt a large top padding reaches past the horizon: the engine loads tiles out to it and stalls, and MapLibre also lowers the pitch (60 -> 55.4 deg) and clamps the padding. The target is now placed at the padded centre by moving the camera centre with CameraPaddingEmulation and the provider's fov; native padding is always zero. Read-back undoes the shift, and padding on the initial camera is applied once the map has a size.
Apply paddings by shifting the camera centre
@wf9a5m75
wf9a5m75 merged commit 44ad8dd 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