onFeatureClick removed

This commit is contained in:
a.kalmakhanov 2022-07-16 21:40:38 +06:00
parent b520d2f93a
commit ad058e14b5
2 changed files with 2 additions and 6 deletions

View File

@ -21,7 +21,6 @@ expect fun MapView(
computeViewPoint: (canvasSize: DpSize) -> MapViewPoint,
features: Map<FeatureId, MapFeature>,
onClick: MapViewPoint.() -> Unit = {},
onFeatureClick: (FeatureId) -> Unit = {},
//TODO consider replacing by modifier
config: MapViewConfig = MapViewConfig(),
modifier: Modifier = Modifier.fillMaxSize(),
@ -33,14 +32,13 @@ fun MapView(
initialViewPoint: MapViewPoint,
features: Map<FeatureId, MapFeature> = emptyMap(),
onClick: MapViewPoint.() -> Unit = {},
onFeatureClick: (FeatureId) -> Unit = {},
config: MapViewConfig = MapViewConfig(),
modifier: Modifier = Modifier.fillMaxSize(),
buildFeatures: @Composable (FeatureBuilder.() -> Unit) = {},
) {
val featuresBuilder = MapFeatureBuilder(features)
featuresBuilder.buildFeatures()
MapView(mapTileProvider, { initialViewPoint }, featuresBuilder.build(), onClick, onFeatureClick, config, modifier)
MapView(mapTileProvider, { initialViewPoint }, featuresBuilder.build(), onClick, config, modifier)
}
@Composable
@ -49,7 +47,6 @@ fun MapView(
box: GmcBox,
features: Map<FeatureId, MapFeature> = emptyMap(),
onClick: MapViewPoint.() -> Unit = {},
onFeatureClick: (FeatureId) -> Unit = {},
config: MapViewConfig = MapViewConfig(),
modifier: Modifier = Modifier.fillMaxSize(),
buildFeatures: @Composable (FeatureBuilder.() -> Unit) = {},
@ -65,5 +62,5 @@ fun MapView(
)
MapViewPoint(box.center, zoom)
}
MapView(mapTileProvider, computeViewPoint, featuresBuilder.build(), onClick, onFeatureClick, config, modifier)
MapView(mapTileProvider, computeViewPoint, featuresBuilder.build(), onClick, config, modifier)
}

View File

@ -41,7 +41,6 @@ actual fun MapView(
computeViewPoint: (canvasSize: DpSize) -> MapViewPoint,
features: Map<FeatureId, MapFeature>,
onClick: MapViewPoint.() -> Unit,
onFeatureClick: (FeatureId) -> Unit,
config: MapViewConfig,
modifier: Modifier,
) {