@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.
Component properties
Name | Type | Description |
---|---|---|
type * | "@yandex-toloka/condition.distance" | Set component type |
from | string | The coordinates that will be compared to the coordinates from the |
hint | string | Validation error message that the user will see |
max | number | The distance in meters by which the specified and sent coordinates may differ. |
to | string | The coordinates that will be compared to the coordinates from the |
Name | Type | Description |
---|---|---|
type * | "@yandex-toloka/condition.distance" | Set component type |
from | string | The coordinates that will be compared to the coordinates from the |
hint | string | Validation error message that the user will see |
max | number | The distance in meters by which the specified and sent coordinates may differ. |
to | string | The coordinates that will be compared to the coordinates from the |