Repository navigation
fix(deps): update maplibre-compose to 0.20 - #6924
Conversation
|
|
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
- ColorLiteral and DpLiteral are internal now, use const() - CameraPosition/CameraUpdate renamed target to center - enum entries are PascalCase, e.g. CameraMoveReason.Gesture Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
geocodingResult is smart-cast to non-null by the preceding when condition. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
f2653ad to
96bc125
Compare
📱 QA build
The QA build installs alongside a released Nextcloud app, so you can keep Downloading the file requires a GitHub account, so open this link on the |
maplibre-compose 0.20 reshapes the public API ahead of 1.0 with many small breaking renames, so on top of the version bump this PR adapts the map code in
LocationPickerScreen.ktandGeolocationMessage.kt:ColorLiteralandDpLiteralare internal now; layer properties useconst(...)instead ofColorLiteral.of(...)/DpLiteral.of(...).CameraPositionandCameraUpdaterenamedtargettocenter.CameraMoveReason.GESTURE→CameraMoveReason.Gesture.!!ongeocodingResultthat the compiler flagged, as the precedingwhencondition already smart-casts it to non-null.No behaviour change is intended. The existing
whenoverStyleLoadStatealready has theelsebranch 0.20 asks for. Verification metadata needed no update, since the new artifacts are covered by the existingorg.maplibrekey.🖼️ Screenshots
🚧 TODO
🏁 Checklist
/backport to stable-xx.x🤖 AI (if applicable)
This PR contains the following updates:
0.19.0→0.20.00.19.0→0.20.00.19.0→0.20.0Warning
Some dependencies could not be looked up. Check the Dependency Dashboard for more information.
Release Notes
maplibre/maplibre-compose (org.maplibre.compose:maplibre-compose-runtime-opengl-android)
v0.20.0This release reshapes the public API ahead of 1.0 to bring it closer to the project's new API guidelines. It also fixes several rendering problems on MapLibre Native, and it makes error handling more predictable.
This release contains many small breaking API changes. Most are renames or a switch to builders, and the compiler can guide you through them. See the upgrade notes below.
Rendering fixes on Android, iOS, macOS, and desktop
These platforms now use MapLibre Native FFI 0.202610.0:
interpolateHclandinterpolateLabwork on these platforms.numberFormatandcollatoruse the requested locale, currency, and number of fraction digits.The browser now uses MapLibre GL JS 6.12.0.
Smoother maps
MapResourceProviderand custom tile providers run onDispatchers.IO, so a provider can do blocking reads, for example from MBTiles, SQLite, or app assets, without stalling the map.MapRuntimenow share one MapLibre engine. To isolate work, create separateMapRuntimes.Predictable errors
Errors now fall into three groups:
IllegalArgumentExceptionorIllegalStateExceptionOther changes:
nullwhen the cluster doesn't exist or the source doesn't cluster its data. Before, they returned an empty result, which looked like a real answer.MapSnapshotter.capturethrowsMapSnapshotExceptionwhen a tile or resource it needs fails to load.MapLoggerno longer breaks the map operation that logged.Other changes
MapConnectivity.mode(Android, iOS, macOS, and desktop) can force MapLibre offline or online for the whole app.ConnectivityMode.Automaticfollows the system's connectivity.minZoomon MapLibre Native, andcurve,screenSpeed, andmaxDurationon the browser.LocationIndicatorLayerclick handlers receive theClickEvent, as other layer handlers do.SystemSettingsLauncheropens the Location Services settings.@ExperimentalMaplibreComposeApimarks APIs that may change in any minor release. It covers APIs that expose engine internals, pre-1.0 dependencies, and some incomplete APIs.Upgrading from v0.19.x
Upgrade, build, and work through the compiler errors by area. Most fixes are mechanical.
Throughout the library
elsebranch towhenexpressions over types the library reports, because later releases can add values.entries,name,ordinal, andvalueOfare gone. UsetoString()or.valueinstead.CameraMoveReason.Gesture.MapLibrein function names is nowMaplibre, for exampleinstallMaplibreCompose.MapRuntimeandMapSnapshottercan't be implemented outside the library.Settings use builders
Build settings with a block, and use
from = previousinstead ofcopy:Functions that take settings, such as source constructors,
createMapRuntime, andsnapshotter.capture, accept the block directly. Each settings type has aStandardpreset.Platform-specific settings of
RenderOptions,DebugOverlays, andMapUiOptionsare now members, so remove their extension imports.Camera and gestures
tiltis nowpitcheverywhere. JSON that your app saved with a"tilt"key must be migrated.targetis nowcenterinCameraPositionandCameraUpdate. PositionalCameraPositionarguments are now in the order center, zoom, bearing, pitch, padding.CameraFit, for examplefitCameraToBounds(box, CameraFit(pitch = 30.0)).Fly.minZoomexists only on MapLibre Native, so move it out of shared code.ScreenCenter(formerlyDefault) orCameraDistance(formerlyDistance).action =instead ofresponse =, with values fromCameraAction,FocusAction, andInputAction. Step and speed settings include their unit, for examplezoomStepLevels.Style, sources, and expressions
nullor do nothing instead of throwingStyleHandleException. HandlenullfromStyleSources.addand from handle reads.limitandoffsetareInt.getBaseSourcereturns video, canvas, and unrecognized source types instead ofnull.missingImageResolverreceives aMissingImageRequest. Readrequest.id.scheme = TileScheme.Tmsinstead oftileCoordinateSystem.SourceDefaultsis removed. PassmaxZoom = 18to keep the old tile limit.encoding = RasterDemEncoding.Custom, redFactor = ….asEnum(LineCap)replacesasEnum<LineCap>(), andpi(),ln2(), ande()replacePI,LN_2, andE. The expression compiler is now internal, so build custom operators withcall(operator, args).mbtilesUrlno longer exists on the browser.Snapshots
Snapshots take the size as a
DpSizeand the display scale as aDensity:When no snapshot renderer is available,
capturethrowsMapSnapshotExceptioninstead ofUnsupportedOperationException.Offline storage
OfflineManageris nowOfflineStorage. Importorg.maplibre.compose.offline.offlineStorageto readruntime.offlineStorage.DownloadProgress.Error.reasonis aMapResourceErrorinstead of a"REASON_*"string. Theerror_reasonproperty fromrememberOfflinePacksSourceis now the reason's name, such asConnection.Location
Webprefix, for exampleWebLocationProvider.SystemSettingsLauncher(...).LocationPermission.Unknownis nowNotDetermined. Unclassified failure reasons and unreported accuracy arenull.Desktop
ComposeMapPresentationHost.macosMetal, and return the matching context type.Configuration
📅 Schedule: (in timezone Europe/Berlin)
* 1-4 * * *)🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about these updates again.
This PR was generated by Mend Renovate. View the repository job log.