@yandex-toloka/condition.distance

This component checks whether the sent coordinates match the ones that you specified.

For example, you want the user to take a photo of a specific place. The condition.distance component checks whether the photo was taken at the location that you specified.

The device coordinates are sent using the data.location component. You can use it without condition.distance if you need to read the user's device coordinates without comparing them to the specified ones.

View example in the sandbox.

Component properties

NameTypeDescription
type*"@yandex-toloka/condition.distance"

Set component type

fromstring

The coordinates that will be compared to the coordinates from the to property.

hintstring

Validation error message that the user will see

maxnumber

The distance in meters by which the specified and sent coordinates may differ.

tostring

The coordinates that will be compared to the coordinates from the from property.