buildFeature

inline fun <G : Geometry?, P> buildFeature(geometry: G, properties: P, builderAction: FeatureBuilder<G, P>.() -> Unit = {}): Feature<G, P>(source)

Builds a Feature using a DSL with both geometry and properties provided upfront.

Providing values upfront allows them to have non-nullable types.

Return

The constructed Feature.

Parameters

G

The type of Geometry for the 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.

geometry

The geometry associated with the feature.

properties

The properties associated with the feature.

builderAction

The builder configuration block where id and bbox can be set.

See also


inline fun <G : Geometry?, P : @Serializable Any> buildFeature(geometry: G, builderAction: FeatureBuilder<G, P?>.() -> Unit = {}): Feature<G, P?>(source)

Builds a Feature using a DSL with Geometry provided upfront.

Properties default to null but can be set in the builder block. Providing geometry upfront allows it to have a non-nullable type.

Return

The constructed Feature.

Parameters

G

The type of Geometry for the 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.

geometry

The geometry associated with the feature.

builderAction

The builder configuration block where properties, id, and bbox can be set.

See also


inline fun <G : Geometry, P : @Serializable Any> buildFeature(builderAction: FeatureBuilder<G?, P?>.() -> Unit = {}): Feature<G?, P?>(source)

Builds a Feature using a DSL.

Both geometry and properties default to null but can be set in the builder block.

Return

The constructed Feature.

Parameters

G

The type of Geometry for the 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.

builderAction

The builder configuration block where geometry, properties, id, and bbox can be set.

See also