Package-level declarations
The Kotlin DSL for creating MapLibre expressions. This is the primary API you'll be using to create expressions.
Types
Represents a variable bound with withVariable. Reference the bound expression with use.
Properties
Converts a numeric Expression to a DpValue expression.
Returns the mathematical constant e
Converts a numeric Expression to an TextUnitValue expression in EM
Returns mathematical constant ln(2) = natural logarithm of 2.
Converts a numeric Expression in milliseconds to a MillisecondsValue expression.
Returns the mathematical constant π
Converts a numeric Expression in seconds to a MillisecondsValue expression.
Converts a numeric Expression to an TextUnitValue expression in SP.
Functions
Returns the absolute value of value, i.e. always a positive value.
Returns the arccosine of value.
Returns whether all expressions are true
.
Returns whether both this and other expressions are true
.
Returns whether any expressions are true
.
Asserts that this value is a boolean.
Asserts that this is a list of numbers of length 2.
Asserts that this value is an entry of the enum specified by T.
Returns the arcsine of value.
Asserts that this value is a map.
Asserts that this value is a number.
Asserts that this is a list of numbers of length 2.
Asserts that this is a list of numbers of length 4.
Asserts that this value is a string.
Asserts that this is a list of numbers, optionally with a specific length.
Returns the arctangent of value.
Returns the smallest integer that is greater than or equal to value.
Evaluates each expression in values in turn until the first non-null value is obtained, and returns that value.
Returns a collator for use in locale-dependent comparison operations. The caseSensitive and diacriticSensitive options default to false
. The locale argument specifies the IETF language tag of the locale to use. If none is provided, the default locale is used. If the requested locale is not available, the collator will use a system-defined fallback locale. Use resolvedLocale to test the results of locale fallback behavior.
Creates a literal expression for an enum value implementing EnumValue.
Creates a literal expression for a PaddingValues.Absolute value.
Creates a literal expression for an Offset value.
Creates a literal expression for a Color value.
Creates a literal expression for a Dp value.
Creates a literal expression for a DpOffset value.
Creates a literal expression for a specified TextUnit value in SP or EM. It can be provided in either unit, and will resolve to one at runtime depending on the property it is used in.
Creates a literal expression for a Boolean value.
Creates a literal expression for a dimensionless Float value.
Creates a literal expression for an dimensionless Int value.
Creates a literal expression for a String value.
Creates a literal expression for a list.
Creates a literal expression for a list of numbers.
Creates a literal expression for a list of strings.
Creates a literal expression for a Duration value.
Returns whether this list contains the item.
Returns whether this string contains the substring.
Converts this expression to a boolean expression.
Converts this expression to a color expression.
Converts this expression to a number.
Converts this expression to a string.
Returns the cosine of value.
Interpolates using the cubic bezier curve defined by the given control points between the pairs of stops.
Returns the shortest distance in meters between the evaluated feature and geometry.
Returns the result of floating point division of this number expression by divisor.
Returns whether this expression is equal to other.
Interpolates exponentially between the stops.
Returns the largest integer that is less than or equal to value.
Returns a formatted string for displaying mixed-format text in the textField
property (see dev.sargunv.maplibrecompose.compose.layer.SymbolLayer). The input may contain a string literal or expression, including an image expression.
Converts this number into a string representation using the provided formatting rules.
Returns the item at index.
Returns the value corresponding the given key or null
if it is not present in this map.
Returns whether this expression is strictly greater than other.
Returns whether this expression is greater than or equal to other.
Returns whether the given key is in this map.
Gets the kernel density estimation of a pixel in a heatmap layer, which is a relative measure of how many data points are crowded around a particular pixel. Can only be used in the expression for the color
parameter in a HeatmapLayer dev.sargunv.maplibrecompose.compose.layer.HeatmapLayer.
Returns an image type for use in iconImage
(see dev.sargunv.maplibrecompose.compose.layer.SymbolLayer), pattern
entries (see dev.sargunv.maplibrecompose.compose.layer.BackgroundLayer, dev.sargunv.maplibrecompose.compose.layer.FillLayer, dev.sargunv.maplibrecompose.compose.layer.FillExtrusionLayer, dev.sargunv.maplibrecompose.compose.layer.LineLayer) and as a section in the format expression.
Returns the first index at which the item is located in this list, or -1
if it cannot be found. Accepts an optional startIndex from where to begin the search.
Returns the first index at which the substring is located in this string, or -1
if it cannot be found. Accepts an optional startIndex from where to begin the search.
Produces continuous, smooth results by interpolating between pairs of input and output values (stops), given the input value. Works like interpolate, but the interpolation is performed in the Hue-Chroma-Luminance color space.
Produces continuous, smooth results by interpolating between pairs of input and output values (stops), given the input value. Works like interpolate, but the interpolation is performed in the CIELAB color space.
Returns true
if this string is expected to render legibly. Returns false
if this string contains sections that cannot be rendered without potential loss of meaning (e.g. Indic scripts that require complex text shaping).
Gets the length of a this list.
Gets the length of this string.
Interpolates linearly between the pairs of stops.
Returns the natural logarithm of value.
Returns the base-ten logarithm of value.
Returns the base-two logarithm of value.
Returns this string converted to lowercase. Follows the Unicode Default Case Conversion algorithm and the locale-insensitive case mappings in the Unicode Character Database.
Returns whether this expression is strictly less than other.
Returns whether this string expression is less than or equal to other.
Returns the greatest of all given numbers.
Returns the smallest of all given numbers.
Returns the result of subtracting other from this number expression.
Returns whether this expression is not equal to other.
Creates a literal expression for a null
value.
Negates this expression.
Returns whether any of this or the other expressions are true
.
Returns the sum of this number expression with other.
Concatenates this string expression with other.
Returns the result of raising this number expression to the power of exponent.
Returns the remainder after integer division of this number expression by divisor.
Returns the IETF language tag of the locale being used by the provided collator. This can be used to determine the default system locale, or to determine if a requested locale was successfully loaded.
Rounds value to the nearest integer. Halfway values are rounded away from zero.
Returns the sine of value.
Returns the items in this list from the startIndex (inclusive) to the end of this list if endIndex is not specified or null
, otherwise to endIndex (exclusive).
Configures an image in a format expression.
Configures a span of text in a format expression.
Returns the square root of value.
Returns a substring from this string from the startIndex (inclusive) to the end of the string if endIndex is not specified or null
, otherwise to endIndex (exclusive).
Selects the first output from the given conditions whose corresponding test condition evaluates to true
, or the fallback value otherwise.
Returns the tangent of value.
Creates a literal expression for TextVariableAnchorOffsetValue, used by dev.sargunv.maplibrecompose.compose.layer.SymbolLayer's textVariableAnchorOffset
parameter.
Returns the product of this number expression with other.
Returns a four-element list, containing the color's red, green, blue, and alpha components, in that order.
Returns a string describing the type of this expression.
Negates this number expression.
Returns this string converted to uppercase. Follows the Unicode Default Case Conversion algorithm and the locale-insensitive case mappings in the Unicode Character Database.
References a Variable bound in withVariable.
Returns true if the evaluated feature is fully contained inside a boundary of the input geometry, false otherwise. The input value can be a valid GeoJSON of type Polygon, MultiPolygon, Feature, or FeatureCollection. Supported features for evaluation:
Gets the current zoom level. Note that in layer style properties, zoom may only appear as the input to a top-level step or interpolate (, interpolateHcl, interpolateLab, ...) expression.