FavoritePinMarkerRenderer

Renderer for creating favorite pin marker bitmaps.

This interface allows customization of favorite marker appearance (HOME, WORK, REGULAR) by providing custom rendering logic based on the favorite type and current theme.

Example usage:

class CustomFavoritePinMarkerRenderer : FavoritePinMarkerRenderer {
override fun createPinBitmap(
context: Context,
theme: Theme,
symbolDescriptor: SymbolDescriptorFavorite,
): Bitmap {
// Calculate dimensions using context resources
val pinSize = (76 * context.resources.displayMetrics.density).roundToInt()
// Use custom icons based on symbolDescriptor.type
}
}

// In DashMapStyleConfig configuration:
mapStyle {
favoritePinMarkerRenderer = CustomFavoritePinMarkerRenderer()
}

See also

Functions

Link copied to clipboard
abstract fun createPinBitmap(context: Context, theme: Theme, symbolDescriptor: SymbolDescriptorFavorite): Bitmap

Creates and renders a pin bitmap for the given favorite symbol descriptor.