From c3ee15756471e7062e112f2938794cfb750b0a75 Mon Sep 17 00:00:00 2001 From: Masashi Katsumata Date: Fri, 6 Nov 2026 18:05:22 -0800 Subject: [PATCH] Default Circle strokeWidth to 1.dp and GroundImage opacity to 1.0f, like their states The component form and the state form of the same overlay drew differently when nothing was passed: Circle and GroundImage components used strokeWidth 2 / opacity 0.5 while their states used 1 / 1.0, and PolygonState used strokeWidth 2 while the Polygon component used 1. Defaults are now the same for both forms on React, Android and iOS: Circle / Polygon / Polyline strokeWidth = 1, GroundImage opacity = 1.0. --- .../java/com/mapconductor/compose/circle/CircleCompose.kt | 2 +- .../mapconductor/compose/groundimage/GroundImageComponent.kt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/mapconductor/compose/circle/CircleCompose.kt b/src/main/java/com/mapconductor/compose/circle/CircleCompose.kt index aa8872b..1afdaac 100644 --- a/src/main/java/com/mapconductor/compose/circle/CircleCompose.kt +++ b/src/main/java/com/mapconductor/compose/circle/CircleCompose.kt @@ -34,7 +34,7 @@ fun MapViewScope.Circle( geodesic: Boolean = true, clickable: Boolean = true, strokeColor: Color = Color.Red, - strokeWidth: Dp = 2.dp, + strokeWidth: Dp = 1.dp, fillColor: Color = Color.White.copy(alpha = 0.5f), zIndex: Int? = null, extra: Serializable? = null, diff --git a/src/main/java/com/mapconductor/compose/groundimage/GroundImageComponent.kt b/src/main/java/com/mapconductor/compose/groundimage/GroundImageComponent.kt index 1760091..09b6ace 100644 --- a/src/main/java/com/mapconductor/compose/groundimage/GroundImageComponent.kt +++ b/src/main/java/com/mapconductor/compose/groundimage/GroundImageComponent.kt @@ -29,7 +29,7 @@ fun MapViewScope.GroundImage(state: GroundImageState) { fun MapViewScope.GroundImage( bounds: GeoRectBounds, image: Drawable, - opacity: Float = 0.5f, + opacity: Float = 1.0f, tileSize: Int = GroundImageTileProvider.DEFAULT_TILE_SIZE, id: String? = null, extra: Serializable? = null, @@ -56,7 +56,7 @@ fun MapViewScope.GroundImage( fun MapViewScope.GroundImage( bounds: GeoRectBounds, imageUrl: String, - opacity: Float = 0.5f, + opacity: Float = 1.0f, tileSize: Int = GroundImageTileProvider.DEFAULT_TILE_SIZE, id: String? = null, extra: Serializable? = null,