Interpolator

Expression interpolator type.

Is used for first parameter of interpolate.

Functions

Link copied to clipboard
open fun abs(@NonNull number: Number): Expression
open fun abs(expression: Expression): Expression
Returns the absolute value of the input.
Link copied to clipboard
Gets the value of a cluster property accumulated so far.
Link copied to clipboard
open fun acos(@NonNull number: Number): Expression
open fun acos(@NonNull number: Expression): Expression
Returns the arccosine of the input.
Link copied to clipboard
open fun all(@NonNull input: Array<Expression>): Expression
Returns `true` if all the inputs are `true`, `false` otherwise.
Link copied to clipboard
open fun any(@NonNull input: Array<Expression>): Expression
Returns `true` if any of the inputs are `true`, `false` otherwise.
Link copied to clipboard
open fun array(@NonNull input: Expression): Expression
Asserts that the input is an array (optionally with a specific item type and length).
Link copied to clipboard
open fun asin(@NonNull number: Number): Expression
open fun asin(@NonNull number: Expression): Expression
Returns the arcsine of the input.
Link copied to clipboard
open fun at(@NonNull number: Number, @NonNull expression: Expression): Expression
open fun at(@NonNull number: Expression, @NonNull expression: Expression): Expression
Retrieves an item from an array.
Link copied to clipboard
open fun atan(@NonNull number: Number): Expression
open fun atan(@NonNull number: Expression): Expression
Returns the arctangent of the input.
Link copied to clipboard
open fun bool(@NonNull input: Array<Expression>): Expression
Asserts that the input value is a boolean.
Link copied to clipboard
open fun ceil(@NonNull number: Number): Expression
open fun ceil(expression: Expression): Expression
Returns the smallest integer that is greater than or equal to the input.
Link copied to clipboard
Evaluates each expression in turn until the first non-null value is obtained, and returns that value.
Link copied to clipboard
open fun collator(caseSensitive: Boolean, diacriticSensitive: Boolean): Expression
open fun collator(caseSensitive: Expression, diacriticSensitive: Expression): Expression
open fun collator(caseSensitive: Boolean, diacriticSensitive: Boolean, locale: Locale): Expression
open fun collator(caseSensitive: Expression, diacriticSensitive: Expression, locale: Expression): Expression
Returns a collator for use in locale-dependent comparison operations.
Link copied to clipboard
open fun color(@ColorInt color: Int): Expression
Expression literal utility method to convert a color int to an color expression Example usage:

FillLayer fillLayer = new FillLayer("layer-id", "source-id");
fillLayer.setProperties(
    fillColor(color(Color.GREEN))
);
Link copied to clipboard
open fun concat(@NonNull input: Array<String>): Expression
Returns a string consisting of the concatenation of the inputs.
Link copied to clipboard
open fun cos(@NonNull number: Number): Expression
open fun cos(@NonNull number: Expression): Expression
Returns the cosine of the input.
Link copied to clipboard
Interpolates using the cubic bezier curve defined by the given control points.
Link copied to clipboard
open fun distance(@NonNull geoJson: GeoJson): Expression
Retrieves the shortest distance between two geometries.
Link copied to clipboard
open fun division(@NonNull first: Number, @NonNull second: Number): Expression
open fun division(@NonNull first: Expression, @NonNull second: Expression): Expression
Returns the result of floating point division of the first input by the second.
Link copied to clipboard
open fun downcase(@NonNull input: String): Expression
Returns the input string converted to lowercase.
Link copied to clipboard
open fun e(): Expression
Returns the mathematical constant e.
Link copied to clipboard
open fun eq(@NonNull compareOne: Expression, compareTwo: Boolean): Expression
open fun eq(@NonNull compareOne: Expression, @NonNull compareTwo: Number): Expression
open fun eq(@NonNull compareOne: Expression, @NonNull compareTwo: String): Expression
open fun eq(@NonNull compareOne: Expression, @NonNull compareTwo: Expression): Expression
open fun eq(@NonNull compareOne: Expression, @NonNull compareTwo: String, @NonNull collator: Expression): Expression
open fun eq(@NonNull compareOne: Expression, @NonNull compareTwo: Expression, @NonNull collator: Expression): Expression
Returns true if the input values are equal, false otherwise.
Link copied to clipboard
open fun equals(@Nullable o: Any): Boolean
Indicates whether some other object is "equal to" this one.
Link copied to clipboard
Interpolates exponentially between the stops just less than and just greater than the input.
Link copied to clipboard
open fun floor(@NonNull number: Number): Expression
open fun floor(expression: Expression): Expression
Returns the largest integer that is less than or equal to the input.
Link copied to clipboard
Returns formatted text containing annotations for use in mixed-format text-field entries.
Link copied to clipboard
Returns a format entry that can be used in format to create formatted text fields.
Link copied to clipboard
Gets the feature's geometry type: Point, MultiPoint, LineString, MultiLineString, Polygon, MultiPolygon.
Link copied to clipboard
open fun get(@NonNull input: String): Expression
open fun get(@NonNull input: Expression): Expression
Retrieves a property value from the current feature's properties, or from another object if a second argument is provided.
open fun get(@NonNull key: String, @NonNull object: Expression): Expression
open fun get(@NonNull key: Expression, @NonNull object: Expression): Expression
Retrieves a property value from another object.
Link copied to clipboard
open fun gt(@NonNull compareOne: Expression, @NonNull compareTwo: Number): Expression
open fun gt(@NonNull compareOne: Expression, @NonNull compareTwo: String): Expression
open fun gt(@NonNull compareOne: Expression, @NonNull compareTwo: Expression): Expression
open fun gt(@NonNull compareOne: Expression, @NonNull compareTwo: String, @NonNull collator: Expression): Expression
open fun gt(@NonNull compareOne: Expression, @NonNull compareTwo: Expression, @NonNull collator: Expression): Expression
Returns true if the first input is strictly greater than the second, false otherwise.
Link copied to clipboard
open fun gte(@NonNull compareOne: Expression, @NonNull compareTwo: Number): Expression
open fun gte(@NonNull compareOne: Expression, @NonNull compareTwo: String): Expression
open fun gte(@NonNull compareOne: Expression, @NonNull compareTwo: Expression): Expression
open fun gte(@NonNull compareOne: Expression, @NonNull compareTwo: String, @NonNull collator: Expression): Expression
open fun gte(@NonNull compareOne: Expression, @NonNull compareTwo: Expression, @NonNull collator: Expression): Expression
Returns true if the first input is greater than or equal to the second, false otherwise.
Link copied to clipboard
open fun has(@NonNull key: String): Expression
open fun has(@NonNull key: Expression): Expression
Tests for the presence of an property value in the current feature's properties.
open fun has(@NonNull key: String, @NonNull object: Expression): Expression
open fun has(@NonNull key: Expression, @NonNull object: Expression): Expression
Tests for the presence of an property value from another object.
Link copied to clipboard
open fun hashCode(): Int
Returns a hash code value for the expression.
Link copied to clipboard
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.
Link copied to clipboard
open fun id(): Expression
Gets the feature's id, if it has one.
Link copied to clipboard
open fun image(@NonNull input: Expression): Expression
Returns image expression for use in '*-pattern' and 'icon-image' layer properties.
Link copied to clipboard
open fun in(@NonNull needle: Number, @NonNull haystack: Expression): Expression
open fun in(@NonNull needle: String, @NonNull haystack: Expression): Expression
open fun in(@NonNull needle: Expression, @NonNull haystack: Expression): Expression
Retrieves whether an item exists in an array or a substring exists in a string.
Link copied to clipboard
open fun indexOf(@NonNull keyword: Expression, @NonNull input: Expression): Expression
open fun indexOf(@NonNull keyword: Expression, @NonNull input: Expression, @NonNull fromIndex: Expression): Expression
Returns the first position at which a `needle` can be found in a `haystack`.
Link copied to clipboard
Produces continuous, smooth results by interpolating between pairs of input and output values (\"stops\").
Link copied to clipboard
open fun isSupportedScript(expression: Expression): Expression
Returns true if the input string is expected to render legibly.
Link copied to clipboard
open fun length(@NonNull input: String): Expression
open fun length(@NonNull expression: Expression): Expression
Gets the length of an array or string.
Link copied to clipboard
open fun let(@Size(min = 1) input: Array<Expression>): Expression
Binds input to named variables, which can then be referenced in the result expression using var or var.
Link copied to clipboard
interpolates linearly between the pair of stops just less than and just greater than the input.
Link copied to clipboard
Gets the progress along a gradient line.
Link copied to clipboard
open fun literal(bool: Boolean): Expression
Create a literal boolean expression.
open fun literal(@NonNull number: Number): Expression
Create a literal number expression.
open fun literal(@NonNull object: Any): Expression
Create a literal object expression.
open fun literal(@NonNull array: Array<Any>): Expression
Create a literal array expression
open fun literal(@NonNull string: String): Expression
Create a literal string expression.
Link copied to clipboard
open fun ln(@NonNull number: Number): Expression
open fun ln(number: Expression): Expression
Returns the natural logarithm of the input.
Link copied to clipboard
open fun ln2(): Expression
Returns mathematical constant ln(2).
Link copied to clipboard
open fun log10(@NonNull number: Number): Expression
open fun log10(@NonNull number: Expression): Expression
Returns the base-ten logarithm of the input.
Link copied to clipboard
open fun log2(@NonNull number: Number): Expression
open fun log2(@NonNull number: Expression): Expression
Returns the base-two logarithm of the input.
Link copied to clipboard
open fun lt(@NonNull compareOne: Expression, @NonNull compareTwo: Number): Expression
open fun lt(@NonNull compareOne: Expression, @NonNull compareTwo: String): Expression
open fun lt(@NonNull compareOne: Expression, @NonNull compareTwo: Expression): Expression
open fun lt(@NonNull compareOne: Expression, @NonNull compareTwo: String, @NonNull collator: Expression): Expression
open fun lt(@NonNull compareOne: Expression, @NonNull compareTwo: Expression, @NonNull collator: Expression): Expression
Returns true if the first input is strictly less than the second, false otherwise.
Link copied to clipboard
open fun lte(@NonNull compareOne: Expression, @NonNull compareTwo: Number): Expression
open fun lte(@NonNull compareOne: Expression, @NonNull compareTwo: String): Expression
open fun lte(@NonNull compareOne: Expression, @NonNull compareTwo: Expression): Expression
open fun lte(@NonNull compareOne: Expression, @NonNull compareTwo: String, @NonNull collator: Expression): Expression
open fun lte(@NonNull compareOne: Expression, @NonNull compareTwo: Expression, @NonNull collator: Expression): Expression
Returns true if the first input is less than or equal to the second, false otherwise.
Link copied to clipboard
open fun match(@NonNull @Size(min = 2) input: Array<Expression>): Expression
open fun match(@NonNull input: Expression, @NonNull defaultOutput: Expression, @NonNull stops: Array<Expression.Stop>): Expression
Selects the output whose label value matches the input value, or the fallback value if no match is found.
Link copied to clipboard
open fun max(@Size(min = 1) numbers: Array<Number>): Expression
open fun max(@Size(min = 1) numbers: Array<Expression>): Expression
Returns the maximum value of the inputs.
Link copied to clipboard
open fun min(@Size(min = 1) numbers: Array<Number>): Expression
open fun min(@Size(min = 1) numbers: Array<Expression>): Expression
Returns the minimum value of the inputs.
Link copied to clipboard
open fun mod(@NonNull first: Number, @NonNull second: Number): Expression
open fun mod(@NonNull first: Expression, @NonNull second: Expression): Expression
Returns the remainder after integer division of the first input by the second.
Link copied to clipboard
open fun neq(compareOne: Expression, compareTwo: Boolean): Expression
Returns true if the input values are equal, false otherwise.
open fun neq(@NonNull compareOne: Expression, @NonNull compareTwo: Number): Expression
open fun neq(@NonNull compareOne: Expression, @NonNull compareTwo: String): Expression
Returns `true` if the input values are not equal, `false` otherwise.
open fun neq(@NonNull compareOne: Expression, @NonNull compareTwo: Expression): Expression
open fun neq(@NonNull compareOne: Expression, @NonNull compareTwo: String, @NonNull collator: Expression): Expression
open fun neq(@NonNull compareOne: Expression, @NonNull compareTwo: Expression, @NonNull collator: Expression): Expression
Returns true if the input values are not equal, false otherwise.
Link copied to clipboard
open fun not(input: Boolean): Expression
open fun not(@NonNull input: Expression): Expression
Logical negation.
Link copied to clipboard
Asserts that the input value is a number.
Link copied to clipboard
Converts the input number into a string representation using the providing formatting rules.
Link copied to clipboard
open fun object(@NonNull input: Expression): Expression
Asserts that the input value is an object.
Link copied to clipboard
open fun pi(): Expression
Returns the mathematical constant pi.
Link copied to clipboard
open fun pow(@NonNull first: Number, @NonNull second: Number): Expression
open fun pow(@NonNull first: Expression, @NonNull second: Expression): Expression
Returns the result of raising the first input to the power specified by the second.
Link copied to clipboard
open fun product(@Size(min = 2) numbers: Array<Number>): Expression
open fun product(@Size(min = 2) numbers: Array<Expression>): Expression
Returns the product of the inputs.
Link copied to clipboard
Gets the feature properties object.
Link copied to clipboard
open fun raw(@NonNull rawExpression: String): Expression
Returns a DSL equivalent of a raw expression.
Link copied to clipboard
open fun resolvedLocale(collator: Expression): Expression
Returns the IETF language tag of the locale being used by the provided collator.
Link copied to clipboard
open fun rgb(@NonNull red: Number, @NonNull green: Number, @NonNull blue: Number): Expression
open fun rgb(@NonNull red: Expression, @NonNull green: Expression, @NonNull blue: Expression): Expression
Creates a color value from red, green, and blue components, which must range between 0 and 255, and an alpha component of 1.
Link copied to clipboard
open fun rgba(@NonNull red: Number, @NonNull green: Number, @NonNull blue: Number, @NonNull alpha: Number): Expression
open fun rgba(@NonNull red: Expression, @NonNull green: Expression, @NonNull blue: Expression, @NonNull alpha: Expression): Expression
Creates a color value from red, green, blue components, which must range between 0 and 255, and an alpha component which must range between 0 and 1.
Link copied to clipboard
open fun round(@NonNull number: Number): Expression
open fun round(expression: Expression): Expression
Rounds the input to the nearest integer.
Link copied to clipboard
open fun sin(@NonNull number: Number): Expression
open fun sin(@NonNull number: Expression): Expression
Returns the sine of the input.
Link copied to clipboard
open fun slice(@NonNull input: Expression, @NonNull fromIndex: Expression): Expression
Returns items from an array or a substring from a string from a specified start index.
open fun slice(@NonNull input: Expression, @NonNull fromIndex: Expression, @NonNull toIndex: Expression): Expression
Returns items from an array or a substring from a string between a start index and an end index if set.
Link copied to clipboard
open fun sqrt(@NonNull number: Number): Expression
Returns the square root of the input Example usage:

CircleLayer circleLayer = new CircleLayer("layer-id", "source-id");
circleLayer.setProperties(
    circleRadius(sqrt(25.0f))
);
open fun sqrt(@NonNull number: Expression): Expression
Returns the square root of the input Example usage:

CircleLayer circleLayer = new CircleLayer("layer-id", "source-id");
circleLayer.setProperties(
    circleRadius(sqrt(pi()))
);
Link copied to clipboard
open fun step(@NonNull input: Number, @NonNull defaultOutput: Number, stops: Array<Expression>): Expression
open fun step(@NonNull input: Number, @NonNull defaultOutput: Number, stops: Array<Expression.Stop>): Expression
open fun step(@NonNull input: Number, @NonNull defaultOutput: Expression, stops: Array<Expression>): Expression
open fun step(@NonNull input: Number, @NonNull defaultOutput: Expression, stops: Array<Expression.Stop>): Expression
open fun step(@NonNull input: Expression, @NonNull defaultOutput: Number, stops: Array<Expression>): Expression
open fun step(@NonNull input: Expression, @NonNull defaultOutput: Number, stops: Array<Expression.Stop>): Expression
open fun step(@NonNull input: Expression, @NonNull defaultOutput: Expression, @NonNull stops: Array<Expression>): Expression
open fun step(@NonNull input: Expression, @NonNull defaultOutput: Expression, stops: Array<Expression.Stop>): Expression
Produces discrete, stepped results by evaluating a piecewise-constant function defined by pairs of input and output values (\"stops\").
Link copied to clipboard
open fun stop(@NonNull stop: Any, @NonNull value: Any): Expression.Stop
Produces a stop value.
Link copied to clipboard
Asserts that the input value is a string.
Link copied to clipboard
open fun subtract(@NonNull number: Number): Expression
open fun subtract(@NonNull number: Expression): Expression
Returns the result of subtracting a number from 0.
open fun subtract(@NonNull first: Number, @NonNull second: Number): Expression
open fun subtract(@NonNull first: Expression, @NonNull second: Expression): Expression
Returns the result of subtracting the second input from the first.
Link copied to clipboard
open fun sum(@Size(min = 2) numbers: Array<Number>): Expression
open fun sum(@Size(min = 2) numbers: Array<Expression>): Expression
Returns the sum of the inputs.
Link copied to clipboard
open fun switchCase(@NonNull @Size(min = 1) input: Array<Expression>): Expression
Selects the first output whose corresponding test condition evaluates to true.
Link copied to clipboard
open fun tan(@NonNull number: Number): Expression
open fun tan(@NonNull number: Expression): Expression
Returns the tangent of the input.
Link copied to clipboard
open fun toArray(): Array<Any>
Converts the expression to Object array representation.
Link copied to clipboard
open fun toBool(@NonNull input: Expression): Expression
Converts the input value to a boolean.
Link copied to clipboard
open fun toColor(@NonNull input: Expression): Expression
Converts the input value to a color.
Link copied to clipboard
Converts the input value to a number, if possible.
Link copied to clipboard
Converts input value to a padding.
Link copied to clipboard
open fun toRgba(@NonNull expression: Expression): Expression
Returns a four-element array containing the input color's red, green, blue, and alpha components, in that order.
Link copied to clipboard
open fun toString(): String
Returns a string representation of the object that matches the definition set in the style specification.
Converts the input value to a string.
Link copied to clipboard
open fun typeOf(@NonNull input: Expression): Expression
Returns a string describing the type of the given value.
Link copied to clipboard
open fun upcase(@NonNull string: String): Expression
open fun upcase(@NonNull string: Expression): Expression
Returns the input string converted to uppercase.
Link copied to clipboard
open fun var(@NonNull variableName: String): Expression
open fun var(@NonNull expression: Expression): Expression
References variable bound using let.
Link copied to clipboard
open fun within(@NonNull polygon: Polygon): Expression
Link copied to clipboard
open fun zoom(): Expression
Gets the current zoom level.