Closed cholwell closed 1 month ago
I am using @Composable MapBoxMap with SymbolLayer.
@Composable MapBoxMap
SymbolLayer
Is there a better way to load images to the style, to use in an expression for iconImage than the following:
iconImage
MapboxMap( modifier = Modifier.fillMaxSize() mapState = mapState, mapViewportState = mapViewportState, style = { //empty } ) { MapEffect(true) { mapView -> mapView.mapboxMap.loadStyle( style("mapbox://my-style") { +image("ic_some_icon", someIcon) } ) } SymbolLayer( sourceState = sourceState, iconImage = ImageValue( Expression.image { get("icon") } ) ) }
This seems wrong but does work
@cholwell I guess this is what you are looking for.
New Feature
I am using
@Composable MapBoxMap
withSymbolLayer
.Is there a better way to load images to the style, to use in an expression for
iconImage
than the following:Why
This seems wrong but does work