Package-level declarations

Types

Link copied to clipboard
sealed interface Anchor
Link copied to clipboard

Orientation of circles when the map is pitched.

Link copied to clipboard

Scaling behavior of circles when the map is pitched.

Link copied to clipboard

Orientation of icon when map is pitched.

Link copied to clipboard

In combination with SymbolPlacement, determines the rotation behavior of icons.

Link copied to clipboard

Scales the icon to fit around the associated text.

Link copied to clipboard

Direction of light source when map is rotated.

Link copied to clipboard

The resampling/interpolation method to use for overscaling, also known as texture magnification filter

Link copied to clipboard
object StrokeCap

Display of line endings

Link copied to clipboard
object StrokeJoin

Display of joined lines

Link copied to clipboard

Part of the icon/text placed closest to the anchor.

Link copied to clipboard

Controls whether to show an icon/text when it overlaps other symbols on the map.

Link copied to clipboard

Symbol placement relative to its geometry.

Link copied to clipboard

Determines whether overlapping symbols in the same layer are rendered in the order that they appear in the data source or by their y-position relative to the viewport. To control the order and prioritization of symbols otherwise, use sortKey.

Link copied to clipboard

Text justification options.

Link copied to clipboard

Orientation of text when map is pitched.

Link copied to clipboard

In combination with SymbolPlacement, determines the rotation behavior of the individual glyphs forming the text.

Link copied to clipboard

Specifies how to capitalize text, similar to the CSS text-transform property.

Link copied to clipboard

How the text will be laid out.

Link copied to clipboard

Frame of reference for offsetting geometry

Functions

Link copied to clipboard
inline fun BackgroundLayer(id: String, minZoom: Float = 0.0f, maxZoom: Float = 24.0f, visible: Boolean = true, opacity: Expression<Number> = const(1), color: Expression<Color> = const(Color.Black), pattern: Expression<TResolvedImage> = nil())

The background layer just draws the map background, by default, plain black.

Link copied to clipboard
inline fun CircleLayer(id: String, source: Source, sourceLayer: String = "", minZoom: Float = 0.0f, maxZoom: Float = 24.0f, filter: Expression<Boolean> = nil(), visible: Boolean = true, sortKey: Expression<Number> = nil(), translate: Expression<Point> = point(0, 0), translateAnchor: Expression<String> = const(TranslateAnchor.Map), opacity: Expression<Number> = const(1), color: Expression<Color> = const(Color.Black), blur: Expression<Number> = const(0), radius: Expression<Number> = const(5), strokeOpacity: Expression<Number> = const(1), strokeColor: Expression<Color> = const(Color.Black), strokeWidth: Expression<Number> = const(0), pitchScale: Expression<String> = const(CirclePitchScale.Map), pitchAlignment: Expression<String> = const(CirclePitchAlignment.Viewport), noinline onClick: (features: List<Feature>) -> Unit? = null, noinline onLongClick: (features: List<Feature>) -> Unit? = null)

A circle layer draws points from the sourceLayer in the given source in the given style as a circles. If nothing else is specified, these will be black dots of 5 dp radius.

Link copied to clipboard
inline fun FillExtrusionLayer(id: String, source: Source, sourceLayer: String = "", minZoom: Float = 0.0f, maxZoom: Float = 24.0f, filter: Expression<Boolean> = nil(), visible: Boolean = true, translate: Expression<Point> = point(0.0, 0.0), translateAnchor: Expression<String> = const(TranslateAnchor.Map), opacity: Expression<Number> = const(1.0), color: Expression<Color> = const(Color.Black), pattern: Expression<TResolvedImage> = nil(), height: Expression<Number> = const(0.0), base: Expression<Number> = const(0.0), verticalGradient: Expression<Boolean> = const(true), noinline onClick: (features: List<Feature>) -> Unit? = null, noinline onLongClick: (features: List<Feature>) -> Unit? = null)

A fill extrusion layer draws polygons from the sourceLayer in the given source in the given style as a series of extruded polygon fills, i.e. a polygon with a certain extent on the z-axis. If nothing else is specified, these 3D polygons will be black and flat.

Link copied to clipboard
inline fun FillLayer(id: String, source: Source, sourceLayer: String = "", minZoom: Float = 0.0f, maxZoom: Float = 24.0f, filter: Expression<Boolean> = nil(), visible: Boolean = true, sortKey: Expression<Number> = nil(), translate: Expression<Point> = point(0.0, 0.0), translateAnchor: Expression<String> = const(TranslateAnchor.Map), opacity: Expression<Number> = const(1.0), color: Expression<Color> = const(Color.Black), pattern: Expression<TResolvedImage> = nil(), antialias: Expression<Boolean> = const(true), outlineColor: Expression<Color> = color, noinline onClick: (features: List<Feature>) -> Unit? = null, noinline onLongClick: (features: List<Feature>) -> Unit? = null)

A fill layer draws polygons from the sourceLayer in the given source in the given style as a series of polygon fills. If nothing else is specified, these will be black.

Link copied to clipboard
inline fun HeatmapLayer(id: String, source: Source, sourceLayer: String = "", minZoom: Float = 0.0f, maxZoom: Float = 24.0f, filter: Expression<Boolean> = nil(), visible: Boolean = true, color: Expression<Color> = interpolate( linear(), heatmapDensity(), 0 to const(Color.Transparent), 0.1 to const(Color(0xFF4169E1)), // royal blue 0.3 to const(Color(0xFF00FFFF)), // cyan 0.5 to const(Color(0xFF00FF00)), // lime 0.7 to const(Color(0xFFFFFF00)), // yellow 1 to const(Color(0xFFFF0000)), // red ), opacity: Expression<Number> = const(1), radius: Expression<Number> = const(30), weight: Expression<Number> = const(1), intensity: Expression<Number> = const(1), noinline onClick: (features: List<Feature>) -> Unit? = null, noinline onLongClick: (features: List<Feature>) -> Unit? = null)

A heatmap layer draws points from the sourceLayer in the given source as a heatmap.

Link copied to clipboard
inline fun HillshadeLayer(id: String, source: Source, minZoom: Float = 0.0f, maxZoom: Float = 24.0f, visible: Boolean = true, shadowColor: Expression<Color> = const(Color.Black), highlightColor: Expression<Color> = const(Color.White), accentColor: Expression<Color> = const(Color.Black), illuminationDirection: Expression<Number> = const(355), illuminationAnchor: Expression<String> = const(IlluminationAnchor.Viewport), exaggeration: Expression<Number> = const(0.5), noinline onClick: (features: List<Feature>) -> Unit? = null, noinline onLongClick: (features: List<Feature>) -> Unit? = null)

Client-side hillshading visualization based on DEM data. The implementation supports Mapbox Terrain RGB, Mapzen Terrarium tiles and custom encodings.

Link copied to clipboard
inline fun LineLayer(id: String, source: Source, sourceLayer: String = "", minZoom: Float = 0.0f, maxZoom: Float = 24.0f, filter: Expression<Boolean> = nil(), visible: Boolean = true, sortKey: Expression<Number> = nil(), translate: Expression<Point> = point(0, 0), translateAnchor: Expression<String> = const(TranslateAnchor.Map), opacity: Expression<Number> = const(1), color: Expression<Color> = const(Color.Black), dasharray: Expression<List<Number>> = nil(), pattern: Expression<TResolvedImage> = nil(), gradient: Expression<Color> = nil(), blur: Expression<Number> = const(0), width: Expression<Number> = const(1), gapWidth: Expression<Number> = const(0), offset: Expression<Number> = const(0), cap: Expression<String> = const(StrokeCap.Butt), join: Expression<String> = const(StrokeJoin.Miter), miterLimit: Expression<Number> = const(2), roundLimit: Expression<Number> = const(1.05), noinline onClick: (features: List<Feature>) -> Unit? = null, noinline onLongClick: (features: List<Feature>) -> Unit? = null)

A line layer draws polylines and polygons from the sourceLayer in the given source in the given style as a series of lines and outlines, respectively. If nothing else is specified, these will be black lines of 1 dp width.

Link copied to clipboard
inline fun RasterLayer(id: String, source: Source, minZoom: Float = 0.0f, maxZoom: Float = 24.0f, visible: Boolean = true, opacity: Expression<Number> = const(1), hueRotate: Expression<Number> = const(0), brightnessMin: Expression<Number> = const(0), brightnessMax: Expression<Number> = const(1), saturation: Expression<Number> = const(0), contrast: Expression<Number> = const(0), resampling: Expression<String> = const(RasterResampling.Linear), fadeDuration: Expression<Number> = const(300), noinline onClick: (features: List<Feature>) -> Unit? = null, noinline onLongClick: (features: List<Feature>) -> Unit? = null)

Raster map textures such as satellite imagery.

Link copied to clipboard
inline fun SymbolLayer(id: String, source: Source, sourceLayer: String = "", minZoom: Float = 0.0f, maxZoom: Float = 24.0f, filter: Expression<Boolean> = nil(), visible: Boolean = true, sortKey: Expression<Number> = nil(), placement: Expression<String> = const(SymbolPlacement.Point), spacing: Expression<Number> = const(250.0), avoidEdges: Expression<Boolean> = const(false), zOrder: Expression<String> = const(SymbolSortOrder.Auto), iconImage: Expression<TResolvedImage> = nil(), iconOpacity: Expression<Number> = const(1.0), iconColor: Expression<Color> = const(Color.Black), iconHaloColor: Expression<Color> = const(Color.Transparent), iconHaloWidth: Expression<Number> = const(0.0), iconHaloBlur: Expression<Number> = const(0.0), iconSize: Expression<Number> = const(1.0), iconRotationAlignment: Expression<String> = const(IconRotationAlignment.Auto), iconPitchAlignment: Expression<String> = const(IconPitchAlignment.Auto), iconTextFit: Expression<String> = const(IconTextFit.None), iconTextFitPadding: Expression<Insets> = insets(0, 0, 0, 0), iconKeepUpright: Expression<Boolean> = const(false), iconRotate: Expression<Number> = const(0.0), iconAnchor: Expression<String> = const(SymbolAnchor.Center), iconOffset: Expression<Point> = point(0, 0), iconPadding: Expression<Number> = const(2.0), iconAllowOverlap: Expression<Boolean> = const(false), iconOverlap: Expression<String> = nil(), iconIgnorePlacement: Expression<Boolean> = const(false), iconOptional: Expression<Boolean> = const(false), iconTranslate: Expression<Point> = point(0, 0), iconTranslateAnchor: Expression<String> = const(TranslateAnchor.Map), textField: Expression<TFormatted> = nil(), textOpacity: Expression<Number> = const(1.0), textColor: Expression<Color> = const(Color.Black), textHaloColor: Expression<Color> = const(Color.Transparent), textHaloWidth: Expression<Number> = const(0.0), textHaloBlur: Expression<Number> = const(0.0), textFont: Expression<List<String>> = literal(listOf(const("Open Sans Regular"), const("Arial Unicode MS Regular"))), textSize: Expression<Number> = const(16.0), textTransform: Expression<String> = const(TextTransform.None), textLetterSpacing: Expression<Number> = const(0.0), textRotationAlignment: Expression<String> = const(TextRotationAlignment.Auto), textPitchAlignment: Expression<String> = const(TextPitchAlignment.Auto), textMaxAngle: Expression<Number> = const(45.0), textMaxWidth: Expression<Number> = const(10.0), textLineHeight: Expression<Number> = const(1.2), textJustify: Expression<String> = const(TextJustify.Center), textWritingMode: Expression<List<String>> = nil(), textKeepUpright: Expression<Boolean> = const(true), textRotate: Expression<Number> = const(0.0), textAnchor: Expression<String> = const(SymbolAnchor.Center), textOffset: Expression<Point> = point(0, 0), textVariableAnchor: Expression<List<String>> = nil(), textRadialOffset: Expression<Number> = const(0.0), textVariableAnchorOffset: Expression<List<Pair<String, Point>>> = nil(), textPadding: Expression<Number> = const(2.0), textAllowOverlap: Expression<Boolean> = const(false), textOverlap: Expression<String> = nil(), textIgnorePlacement: Expression<Boolean> = const(false), textOptional: Expression<Boolean> = const(false), textTranslate: Expression<Point> = point(0, 0), textTranslateAnchor: Expression<String> = const(TranslateAnchor.Map), noinline onClick: (features: List<Feature>) -> Unit? = null, noinline onLongClick: (features: List<Feature>) -> Unit? = null)

A symbol layer draws data from the sourceLayer in the given source as icons and/or text labels.