com.maptiler.maptilersdk.helpers

Types

Basic benchmarking helper for Kotlin SDK.

data class MTColorValue(val raw: String)

Color wrapper that always encodes as a hex string. Accepts #RRGGBB or #RRGGBBAA (CSS hex). When constructed from a color int, outputs #RRGGBB if opaque, otherwise #RRGGBBAA (alpha at the end).

sealed class MTDashArrayOption

Dash array option accepting either an array of numbers or the underscore/space pattern string.

class MTHeatmapLayerHelper(style: MTStyle) : MTVectorLayerHelper

Helper for creating a heatmap visualization layer from data and styling options.

data class MTHeatmapLayerOptions(val data: String, val layerId: String? = null, val sourceId: String? = null, val beforeId: String? = null, val minzoom: Double? = null, val maxzoom: Double? = null, val colorRamp: MTColorRamp? = null, val property: String? = null, val weight: MTNumberOrPropertyValues? = null, val radius: MTRadiusOption? = null, val opacity: MTNumberOrZoomNumberValues? = null, val intensity: MTNumberOrZoomNumberValues? = null, val zoomCompensation: Boolean? = null)

Options for building a heatmap visualization layer through the helper.

@Serializable
data class MTHelperPropertyValue(val propertyValue: Double, val value: Double)

Property/value pair for data-driven styles.

number | PropertyValues

Outline position relative to polygon edge.

Performance-oriented presets for MapTiler Kotlin SDK.

class MTPointLayerHelper(style: MTStyle) : MTVectorLayerHelper

Helper for creating a point visualization layer from data and styling options.

@Serializable
data class MTPointLayerOptions(val data: String, val layerId: String? = null, val sourceId: String? = null, val beforeId: String? = null, val minzoom: Double? = null, val maxzoom: Double? = null, val outline: Boolean? = null, val outlineColor: MTStringOrZoomStringValues? = null, val outlineWidth: MTNumberOrZoomNumberValues? = null, val outlineOpacity: MTNumberOrZoomNumberValues? = null, val pointColor: MTColorValue? = null, val pointColorRamp: MTColorRamp? = null, val pointRadius: MTNumberOrZoomNumberValues? = null, val minPointRadius: Double? = null, val maxPointRadius: Double? = null, val property: String? = null, val pointOpacity: MTNumberOrZoomNumberValues? = null, val alignOnViewport: Boolean? = null, val cluster: Boolean? = null, val showLabel: Boolean? = null, val labelColor: MTColorValue? = null, val labelSize: Double? = null, val zoomCompensation: Boolean? = null)

Options for building a point visualization layer through the helper.

class MTPolygonLayerHelper(style: MTStyle) : MTVectorLayerHelper

Helper for creating a polygon visualization layer from data and styling options.

@Serializable
data class MTPolygonLayerOptions(val data: String, val layerId: String? = null, val sourceId: String? = null, val beforeId: String? = null, val minzoom: Double? = null, val maxzoom: Double? = null, val outline: Boolean? = null, val outlineColor: MTStringOrZoomStringValues? = null, val outlineWidth: MTNumberOrZoomNumberValues? = null, val outlineOpacity: MTNumberOrZoomNumberValues? = null, val fillColor: MTStringOrZoomStringValues? = null, val fillOpacity: MTNumberOrZoomNumberValues? = null, val outlinePosition: MTOutlinePosition? = null, val outlineDashArray: MTDashArrayOption? = null, val outlineCap: MTLineCap? = null, val outlineJoin: MTLineJoin? = null, val pattern: String? = null, val outlineBlur: MTNumberOrZoomNumberValues? = null)

Options for building a polygon visualization layer through the helper.

class MTPolylineLayerHelper(style: MTStyle) : MTVectorLayerHelper

Helper for creating a polyline visualization layer from data and styling options.

@Serializable
data class MTPolylineLayerOptions(val data: String, val layerId: String? = null, val sourceId: String? = null, val beforeId: String? = null, val minzoom: Double? = null, val maxzoom: Double? = null, val outline: Boolean? = null, val outlineColor: MTStringOrZoomStringValues? = null, val outlineWidth: MTNumberOrZoomNumberValues? = null, val outlineOpacity: MTNumberOrZoomNumberValues? = null, val lineColor: MTStringOrZoomStringValues? = null, val lineWidth: MTNumberOrZoomNumberValues? = null, val lineOpacity: MTNumberOrZoomNumberValues? = null, val lineBlur: MTNumberOrZoomNumberValues? = null, val lineGapWidth: MTNumberOrZoomNumberValues? = null, val lineDashArray: MTDashArrayOption? = null, val lineCap: MTLineCap? = null, val lineJoin: MTLineJoin? = null, val outlineBlur: MTNumberOrZoomNumberValues? = null)

Options for building a polyline visualization layer through the helper.

@Serializable(with = MTRadiusOptionSerializer::class)
sealed class MTRadiusOption

number | ZoomNumberValues | PropertyValues

string | ZoomStringValues | Android color

@Serializable
data class MTZoomNumberValue(val zoom: Double, val value: Double)

Zoom/value pair for number-based ramps.

@Serializable
data class MTZoomStringValue(val zoom: Double, val value: String)

Zoom/value pair for string-based ramps.

Functions

fun Int.toHexString(withAlpha: Boolean = false, withHexPrefix: Boolean = true): String

Returns a new MTMapOptions with balanced performance defaults applied over this instance.

Returns a new MTMapOptions with high-fidelity defaults applied over this instance.

Applies the lean performance preset over this instance, returning a new options object.