MapConductor Icons provides a collection of pre-built marker icon types for the MapConductor SDK.
Each icon implements MarkerIconInterface and can be passed directly as the icon parameter of MarkerState.
https://docs-android.mapconductor.com/setup/
A simple filled circle icon.
val icon = CircleIcon(
fillColor = Color.Red,
strokeColor = Color.White,
strokeWidth = 2.dp,
scale = 1f,
)
val markerState = remember {
MarkerState(
position = GeoPoint(latitude = 35.6762, longitude = 139.6503),
icon = icon,
)
}
XxxMapView(...) {
Marker(markerState)
}A flag-shaped icon with a pole.
val icon = FlagIcon(
fillColor = Color.Blue,
strokeColor = Color.White,
strokeWidth = 2.dp,
scale = 1f,
)An info-bubble icon with a drawable, a label, and a snippet. The tail points downward-right, anchored at the bottom of the bubble.
val icon = RightTailInfoBubbleIcon(
iconDrawable = ContextCompat.getDrawable(context, R.drawable.ic_car)!!,
label = "5h 37m",
snippet = "304 miles",
fillColor = Color.White,
labelTextColor = Color.Black,
scale = 1f,
iconSize = MarkerIconSize.Small,
)A rounded info-bubble icon with a drawable and a label.
val icon = RoundInfoBubbleIcon(
iconDrawable = ContextCompat.getDrawable(context, R.drawable.ic_store)!!,
label = "Tokyo",
fillColor = Color.White,
scale = 1f,
iconSize = MarkerIconSize.Small,
)| Parameter | Type | Default |
|---|---|---|
fillColor |
Color |
Color.Red |
strokeColor |
Color |
Color.White |
strokeWidth |
Dp |
Settings.Default.iconStroke |
scale |
Float |
1f |
iconSize |
Dp |
Settings.Default.iconSize |
| Parameter | Type | Default |
|---|---|---|
fillColor |
Color |
Color.Red |
strokeColor |
Color |
Color.White |
strokeWidth |
Dp |
Settings.Default.iconStroke |
scale |
Float |
1f |
iconSize |
Dp |
Settings.Default.iconSize |
| Parameter | Type | Default |
|---|---|---|
iconDrawable |
Drawable |
required |
label |
String |
required |
snippet |
String |
required |
fillColor |
Color |
Color.LightGray |
labelTextColor |
Color |
Color.Yellow |
scale |
Float |
1f |
iconSize |
Dp |
MarkerIconSize.Small |
| Parameter | Type | Default |
|---|---|---|
iconDrawable |
Drawable |
required |
label |
String |
required |
fillColor |
Color |
Color.White |
scale |
Float |
1f |
iconSize |
Dp |
MarkerIconSize.Small |