featureProperties

An object defining custom properties of the model. Properties are accessible as feature properties in expressions.

Parameters

value

as HashMap


An object defining custom properties of the model. Properties are accessible as feature properties in expressions.

Example usage:

modelSourceModel("car-1") {
uri("https://example.com/car.glb")
featureProperties(hashMapOf(
"vehicleType" to "sedan",
"fleetId" to 42
))
}

These properties can then be accessed in layer expressions:

modelLayer("car-layer", "car-source") {
modelColor(
match {
get { literal("vehicleType") }
literal("sedan")
rgba { literal(0.0); literal(0.0); literal(1.0); literal(1.0) }
rgba { literal(1.0); literal(0.0); literal(0.0); literal(1.0) }
}
)
}