Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion api/android-sdk-compose.api
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public final class com.mapconductor.compose.map.MapAttributionOverlayKt {
public static final void MapAttributionOverlay(java.util.List<java.lang.String>, androidx.compose.runtime.Composer, int);
}
public final class com.mapconductor.compose.map.MapViewBaseKt {
public static final <SpecificState extends com.mapconductor.core.map.MapViewStateInterface<?>, SpecificController extends com.mapconductor.core.controller.BaseMapViewController, ActualMapView extends android.view.View, ActualMap, SpecificScope extends com.mapconductor.compose.MapViewScope, SpecificHolder extends com.mapconductor.core.map.MapViewHolderInterface<ActualMapView, ActualMap>> void MapViewBase(SpecificState, androidx.compose.runtime.MutableState<com.mapconductor.core.map.MapCameraPositionInterface>, androidx.compose.ui.Modifier, kotlin.jvm.functions.Function2<? super androidx.compose.runtime.Composer, ? super java.lang.Integer, ? extends ActualMapView>, SpecificScope, com.mapconductor.core.map.MapOverlayRegistry, kotlin.jvm.functions.Function1<? super kotlin.coroutines.Continuation<? super java.lang.Boolean>, ? extends java.lang.Object>, kotlin.jvm.functions.Function2<? super ActualMapView, ? super kotlin.coroutines.Continuation<? super SpecificHolder>, ? extends java.lang.Object>, kotlin.jvm.functions.Function2<? super SpecificHolder, ? super kotlin.coroutines.Continuation<? super SpecificController>, ? extends java.lang.Object>, kotlin.jvm.functions.Function1<? super com.mapconductor.core.map.MapViewStateInterface<?>, kotlin.Unit>, kotlin.jvm.functions.Function4<? super com.mapconductor.core.map.InitState, ? super androidx.compose.ui.node.Ref<SpecificHolder>, ? super androidx.compose.runtime.Composer, ? super java.lang.Integer, kotlin.Unit>, kotlin.jvm.functions.Function3<? super SpecificScope, ? super androidx.compose.runtime.Composer, ? super java.lang.Integer, kotlin.Unit>, androidx.compose.runtime.Composer, int, int, int);
public static final <SpecificState extends com.mapconductor.core.map.MapViewStateInterface<?>, SpecificController extends com.mapconductor.core.controller.BaseMapViewController, ActualMapView extends android.view.View, ActualMap, SpecificScope extends com.mapconductor.compose.MapViewScope, SpecificHolder extends com.mapconductor.core.map.MapViewHolderInterface<ActualMapView, ActualMap>> void MapViewBase(SpecificState, androidx.compose.runtime.MutableState<com.mapconductor.core.map.MapCameraPositionInterface>, androidx.compose.ui.Modifier, kotlin.jvm.functions.Function2<? super androidx.compose.runtime.Composer, ? super java.lang.Integer, ? extends ActualMapView>, SpecificScope, com.mapconductor.core.map.MapOverlayRegistry, kotlin.jvm.functions.Function1<? super kotlin.coroutines.Continuation<? super java.lang.Boolean>, ? extends java.lang.Object>, kotlin.jvm.functions.Function2<? super ActualMapView, ? super kotlin.coroutines.Continuation<? super SpecificHolder>, ? extends java.lang.Object>, kotlin.jvm.functions.Function2<? super SpecificHolder, ? super kotlin.coroutines.Continuation<? super SpecificController>, ? extends java.lang.Object>, kotlin.jvm.functions.Function1<? super com.mapconductor.core.map.MapViewStateInterface<?>, kotlin.Unit>, kotlin.jvm.functions.Function4<? super com.mapconductor.core.map.InitState, ? super androidx.compose.ui.node.Ref<SpecificHolder>, ? super androidx.compose.runtime.Composer, ? super java.lang.Integer, kotlin.Unit>, com.mapconductor.core.map.MapViewStyle, kotlin.jvm.functions.Function1<? super java.util.List<java.lang.String>, kotlin.Unit>, kotlin.jvm.functions.Function3<? super SpecificScope, ? super androidx.compose.runtime.Composer, ? super java.lang.Integer, kotlin.Unit>, androidx.compose.runtime.Composer, int, int, int);
}
public final class com.mapconductor.compose.marker.LocalMarkerCollectorKt {
public static final androidx.compose.runtime.ProvidableCompositionLocal<com.mapconductor.core.OverlayCollectorInterface<com.mapconductor.core.marker.MarkerState>> getLocalMarkerCollector();
Expand Down
9 changes: 5 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,11 @@ val libraryName = "MapConductor Compose"
val libraryDescription = "Jetpack Compose for MapConductor"

// Gradle 9.6 で `by tasks.registering` は非推奨(スクリプトコンパイルエラーになる)。
val javadocJar = tasks.register<Jar>("javadocJar") {
archiveClassifier.set("javadoc")
// Since Android libraries don't have Javadoc task by default, create empty jar
}
val javadocJar =
tasks.register<Jar>("javadocJar") {
archiveClassifier.set("javadoc")
// Since Android libraries don't have Javadoc task by default, create empty jar
}

afterEvaluate {
publishing {
Expand Down
16 changes: 15 additions & 1 deletion src/main/java/com/mapconductor/compose/map/MapViewBase.kt
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,12 @@ import com.mapconductor.core.map.MapOverlayRegistry
import com.mapconductor.core.map.MapPaddings
import com.mapconductor.core.map.MapViewHolderInterface
import com.mapconductor.core.map.MapViewStateInterface
import com.mapconductor.core.map.MapViewStyle
import com.mapconductor.core.map.MapViewStyleEffect
import com.mapconductor.core.map.ScreenProjectionRequirement
import com.mapconductor.core.map.VectorStyleSupportKey
import com.mapconductor.core.map.resolveMapAttributions
import com.mapconductor.core.marker.MarkerCapableInterface
import com.mapconductor.core.map.VectorStyleSupportKey
import com.mapconductor.core.marker.MarkerIconExtent
import com.mapconductor.core.marker.MarkerRenderingSupportKey
import com.mapconductor.core.polygon.PolygonCapableInterface
Expand Down Expand Up @@ -105,6 +107,8 @@ fun <
controllerProvider: suspend (holder: SpecificHolder) -> SpecificController,
onMapLoaded: OnMapLoadedHandler? = null,
customDisposableEffect: (@Composable (InitState, Ref<SpecificHolder>) -> Unit)? = null,
style: MapViewStyle? = null,
onStyleDiagnostics: ((List<String>) -> Unit)? = null,
content: (@Composable SpecificScope.() -> Unit)? = null,
) {
ResourceProvider.init(LocalContext.current)
Expand All @@ -131,6 +135,16 @@ fun <
}
}

// How the map looks, as a property of the map. One call, every provider:
// what a style does to this particular backend is decided by what the
// backend registered it can do, not here. See `MapViewStyleEffect`.
MapViewStyleEffect(
state = state,
style = style,
controller = controller,
onDiagnostics = onStyleDiagnostics,
)

controller?.also {
controller.setMapInitializedListener {
initState = InitState.MapLoaded
Expand Down
Loading