mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-10-07 19:11:27 -04:00
chore(deps): update maplibre.compose to v0.19.0 (#7354)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: James Rich <2199651+jamesarich@users.noreply.github.com>
This commit is contained in:
1 parent
94979bffd1
commit
5bfbcea1e7
3 files changed
+7
-4
No files matched your search
+3
-1
@@ -44,6 +44,7 @@ import org.maplibre.compose.map.DefaultMapRuntime
|
||||
import org.maplibre.compose.offline.DownloadProgress
|
||||
import org.maplibre.compose.offline.DownloadStatus
|
||||
import org.maplibre.compose.offline.OfflineManager
|
||||
import org.maplibre.compose.offline.OfflineManagerState
|
||||
import org.maplibre.compose.offline.OfflinePack
|
||||
import org.maplibre.compose.offline.OfflinePackDefinition
|
||||
import org.maplibre.spatialk.geojson.BoundingBox
|
||||
@@ -90,7 +91,8 @@ internal fun OfflineMapsSection(target: OfflineMapTarget, onShowRegion: (Boundin
|
||||
// the one every map here uses, so its packs are the ones the user sees on the map.
|
||||
val manager = DefaultMapRuntime.instance.offlineManager
|
||||
val scope = rememberCoroutineScope()
|
||||
val packs by manager.packs.collectAsStateWithLifecycle()
|
||||
val managerState by manager.state.collectAsStateWithLifecycle()
|
||||
val packs = (managerState as? OfflineManagerState.Ready)?.packs.orEmpty()
|
||||
// A pack definition now carries the pixel ratio it was downloaded at, so the tiles match this display.
|
||||
val pixelRatio = LocalDensity.current.density
|
||||
|
||||
|
||||
+3
-2
@@ -22,7 +22,6 @@ import androidx.compose.runtime.key
|
||||
import androidx.compose.runtime.produceState
|
||||
import androidx.compose.runtime.remember
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.graphics.ImageBitmap
|
||||
import androidx.compose.ui.graphics.painter.Painter
|
||||
import androidx.compose.ui.unit.DpSize
|
||||
import androidx.compose.ui.unit.dp
|
||||
@@ -59,6 +58,7 @@ import org.maplibre.compose.sources.GeoJsonData
|
||||
import org.maplibre.compose.sources.rememberGeoJsonSource
|
||||
import org.maplibre.compose.sources.rememberImageSource
|
||||
import org.maplibre.compose.util.PositionQuad
|
||||
import org.maplibre.compose.util.PreparedImage
|
||||
import org.maplibre.spatialk.geojson.Position
|
||||
import org.meshtastic.core.common.util.ioDispatcher
|
||||
import org.meshtastic.core.common.util.safeCatching
|
||||
@@ -206,13 +206,14 @@ private fun GroundOverlayLayer(layerId: String, index: Int, overlay: LayerGround
|
||||
// Decoded off the composition thread: an ESRI export's tile is routinely multi-megapixel, and a synchronous
|
||||
// decode in `remember` would hitch the map for every overlay on every first composition.
|
||||
val image by
|
||||
produceState<ImageBitmap?>(initialValue = null, overlay.imagePath) {
|
||||
produceState<PreparedImage?>(initialValue = null, overlay.imagePath) {
|
||||
value =
|
||||
withContext(ioDispatcher) {
|
||||
safeCatching {
|
||||
mapLayerFileSystem()
|
||||
.read(overlay.imagePath.toLocalPath()) { readByteArray() }
|
||||
.decodeToImageBitmap()
|
||||
.let(PreparedImage::fromBitmap)
|
||||
}
|
||||
.onFailure {
|
||||
Logger.withTag("CustomLayers").w(it) { "Could not decode a ground overlay image" }
|
||||
|
||||
@@ -70,7 +70,7 @@ jetbrains-adaptive = "1.3.0-rc01"
|
||||
# 2.8.0–2.8.1). KML is now read by the app's own xmlutil-based converter and that parser is unused, so
|
||||
# the pairing — and the canary test that guarded it — is gone. The floor stays as a plain minimum.
|
||||
android-maps-utils = "6.0.0"
|
||||
maplibre-compose = "0.18.0"
|
||||
maplibre-compose = "0.19.0"
|
||||
maps-compose = "9.0.0"
|
||||
|
||||
# ML Kit
|
||||
|
||||
Reference in new issue
Block a user