Skip to content

Release 1.4.0 - #33

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 に合わせる。

* fix: declare material-icons-core for the sample app

sample-app が Icons.AutoMirrored を使うが、material3 は material-icons を推移的に持ってこないため単体ビルドで Unresolved reference 'Icons' になる。版は compose BOM 任せで、集約ビルドの catalog と同じ形にする。
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.
* fix: cancel obsolete Google local tile requests

* 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.
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.
Google Maps shows the tiles of the floored camera zoom, so at 17.75 it
stretched z17 tiles by 1.68x and street-tree icons and labels came out twice
as large as on MapLibre, which shows z18 at 0.84x. Pass the rounded camera
zoom to MarkerTileRenderer so the tiles are drawn at the size MapLibre shows,
and refresh the tiles when the rounded zoom changes.
Changing a raster layer's source removed the old tile overlay before adding
the new one, so the layer vanished until the new tiles arrived. For marker
tiles that is about 0.3 s, and it now happens every time a pinch crosses a
half zoom (the tiles are redrawn for the rounded zoom), as well as on every
relabel. Add the new overlay first and remove the old one once the new one
has served its tiles and gone quiet for 150 ms (at most 1.5 s).

Checked by screen recording a one-finger zoom across 17.5 on a Pixel 5a and
a TB520FU: the tiles switch to the new size with no frame missing them.
The private nested class compiled into the recorded API surface. An
AtomicLong does the same job without adding a class.
Redraw tiles once per burst of tiled-marker changes
The 1.3.0 release (f2cb298) moved overlay wiring onto
registerOverlayController but left the ground image controller out, so
GroundImage states never reached GoogleMapGroundImageController and nothing
was drawn. Every other provider registers it.
…ntroller

Register the ground image controller again
- The saver kept only the id and restored through Create(id), so Custom
  designs lost their attribution rules (and unknown ids became None).
  It now records whether the design was a preset.
- The controller started with None and reported it on listener attach,
  and onMapLoaded reported a preset rebuilt from mapType. The state now
  seeds the controller and ignores a report with the same mapType, so a
  Custom design keeps its rules.
- 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.
The MapView was destroyed only on a configuration change; a provider
switch left it alive, and the SDK thread behind it kept the controller
with every overlay. It is now released through MapViewBase's
onDestroyMapView, once, whatever the reason the map went away. The
lifecycle observer keeps forwarding onResume / onPause only.
The SDK keeps the TileProvider of every tile overlay in a process-wide
table, even after the overlay is removed and the MapView destroyed
(measured). Our provider reached the renderer, its holder and the MapView,
so every Google map the user switched away from stayed in memory.

The SDK now gets a provider that only forwards; it is cut from the real
one when its overlay is removed, retired or the controller destroyed.
Destroying the controller also removes every overlay it added and closes
the local tile queues, before the MapView is destroyed.
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 geodesic ring was densified with createInterpolatePoints, which only
interpolates between neighbouring points. Rings arrive open, so the
closing edge (last vertex -> first) stayed a straight chord, and since the
native Polygon draws fill and outline from the same points, both were
straight there (Boston -> London -> Iceland: the Iceland -> Boston edge).
Use android-sdk-core's densifyGeodesicRing. geodesic=false is unchanged.

Requires the android-sdk-core release that adds densifyGeodesicRing.
A geodesic=false ring went through Planar.createInterpolatePoints, which
only interpolates between neighbouring points, so the closing edge (last
vertex -> first) stayed one straight Web Mercator segment while the other
edges - and polylines with geodesic=false - follow linear lat/lng
interpolation. Use android-sdk-core's densifyPolygonRing for both modes
(it replaces the unreleased densifyGeodesicRing).

Requires the android-sdk-core release that adds densifyPolygonRing.
Release the map view and the controller when the map leaves the composition
Interpolate the closing edge of polygons, geodesic or not
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).
Google Maps orders tile overlays, ground overlays, polygons, circles and
polylines by one zIndex (markers always above). Ground overlays had no
zIndex (0, same as polygons, order undefined), rasters used their own
zIndex (0, so they covered polylines and ground images), and circles
defaulted to the latitude-based zIndex (about -35 000 000 in Tokyo),
which put them under everything, including rasters.

Every kind now goes through OverlayStacking.flatZIndex(kind, zIndex):
each band gets its own interval and zIndex orders within it. Marker
tiles sit at the bottom of the marker band (above polylines).

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()
With develop's OverlayStacking, a raster layer goes in the raster band, under
ground images. The polygon tiles are polygons drawn as images, so they go
over ground images and under circles, polylines and markers.
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. flatZIndex(Polyline, Int.MIN_VALUE): over circles, under native polylines.
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 unspecified-zIndex key was -latitude * 10^6 (about -3.57e7 in Tokyo),
and Google Maps drew an explicit zIndex 1 marker behind it. zIndex is now
the primary key and the south-then-west tiebreak stays below 0.5.
Same-zIndex markers follow the screen position (lower in front) and are
re-sorted after rotation settles.
Stack markers by the shared draw order
GoogleMap.setPadding is not used: it shifts the view the moment it is
set, so an animated move jumps at the start, and it also moves the logo
and controls. Paddings are emulated by moving the camera center with
CameraPaddingEmulation and undone when the camera is read. fov is 30
(Google has no API for it; measured 30 on TB520FU portrait, landscape
and half size, unlike the ~25 of the JS vector map).
Report camera fov and apply paddings
@wf9a5m75
wf9a5m75 merged commit b7dd1b2 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