FeatureBuilder

class FeatureBuilder<G : Geometry?, P>(var geometry: G, var properties: P)(source)

Builder for constructing Feature objects using a DSL.

Parameters

G

The type of Geometry associated with this Feature.

P

The type of properties. This can be any type that serializes to a JSON object. For dynamic or unknown property schemas, use JsonObject. For known schemas, use a Serializable data class.

See also

Constructors

Link copied to clipboard
constructor(geometry: G, properties: P)

Properties

Link copied to clipboard

An optional BoundingBox for this Feature.

Link copied to clipboard
var geometry: G

The Geometry associated with this Feature.

Link copied to clipboard

An optional identifier for this Feature.

Link copied to clipboard

Additional properties about this Feature.

Functions

Link copied to clipboard
fun build(): Feature<G, P>

Builds the Feature from the configured values.

Link copied to clipboard
fun setId(value: Double)

Sets the Feature identifier using a double value.

fun setId(value: Long)

Sets the Feature identifier using a long value.

fun setId(value: String)

Sets the Feature identifier using a string value.