Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import androidx.compose.ui.platform.LocalDensity
import androidx.compose.ui.unit.dp
import com.mapconductor.compose.info.InfoBubbleEntry
import com.mapconductor.core.marker.DefaultMarkerIcon
import com.mapconductor.core.marker.iconRevision
import com.mapconductor.core.marker.MarkerAnimation
import com.mapconductor.core.marker.MarkerState
import com.mapconductor.settings.Settings
Expand Down Expand Up @@ -48,7 +49,10 @@ internal fun MapTilerMarkerOverlay(
) {
val density = LocalDensity.current.density
val scope = rememberCoroutineScope()
val bitmapIcon = remember(marker.icon) { (marker.icon ?: DefaultMarkerIcon()).toBitmapIcon() }
// URL の画像が届くと、アイコンは同じインスタンスのまま見た目だけ変わる。iconRevision が
// そのとき増えるので、それもキーにする(読むことで描き直しも起きる)。
val bitmapIcon =
remember(marker.icon, marker.iconRevision) { (marker.icon ?: DefaultMarkerIcon()).toBitmapIcon() }
val widthDp = remember(bitmapIcon) { (bitmapIcon.size.width / density).dp }
val heightDp = remember(bitmapIcon) { (bitmapIcon.size.height / density).dp }

Expand Down
Loading