Package com.mapbox.maps.extension.style.utils

Types

ColorUtils
Link copied to clipboard

Color utility class.

object ColorUtils

Functions

silentUnwrap
Link copied to clipboard

Extension function for StylePropertyValue to silently unwrap StylePropertyValue to given type.

Returns null if couldn't convert or type doesn't match.

inline fun <T> StylePropertyValue.silentUnwrap(): T?
toValue
Link copied to clipboard

Extension function for Feature to convert Feature to Value.

fun Feature.toValue(): Value

Extension function for FeatureCollection to convert FeatureCollection to Value.

fun FeatureCollection.toValue(): Value

Extension function for Geometry to convert Geometry to Value.

fun Geometry.toValue(): Value
unwrap
Link copied to clipboard

Extension function for StylePropertyValue to unwrap StylePropertyValue to given type.

Throws exception if couldn't convert or type doesn't match.

inline fun <T> StylePropertyValue.unwrap(): T
unwrapToAny
Link copied to clipboard

Extension function for Value to unwrap Value to Any.

fun Value.unwrapToAny(): Any
unwrapToExpression
Link copied to clipboard

Extension function for Value to unwrap Value to Expression.

Throws exception if couldn't convert.

fun Value.unwrapToExpression(): Expression
unwrapToStyleTransition
Link copied to clipboard

Extension function for Value to unwrap Value to StyleTransition.

Throws exception if couldn't convert.

fun Value.unwrapToStyleTransition(): StyleTransition
unwrapToTyped
Link copied to clipboard

Extension function for Value to unwrap Value to the given type.

Throws exception if type doesn't match.

inline fun <T> Value.unwrapToTyped(): T