createFromGeoElement

fun createFromGeoElement(geoElement: GeoElement, bufferDistance: Double): FenceParameters

Static factory function to create a FenceParameters. This method creates the appropriate type of FenceParameters based on the type of the com.arcgismaps.mapping.GeoElement that was supplied. The supported types of com.arcgismaps.mapping.GeoElement are com.arcgismaps.mapping.view.Graphic and com.arcgismaps.data.Feature.

If passed an unsupported com.arcgismaps.mapping.GeoElement, this method will return null.

Return

A FenceParameters created from a com.arcgismaps.mapping.GeoElement.

Since

200.1.0

Parameters

geoElement

An individual com.arcgismaps.mapping.GeoElement used to create a FenceParameters object.

bufferDistance

A buffer distance in meters to apply to the com.arcgismaps.mapping.GeoElement when checking if a Geotrigger condition is met.

Throws

if the provided GeoElement is not a Graphic or Feature.