@toloka/condition.distance

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

For example, you want a Toloker 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 a Toloker's device coordinates without comparing them to the specified ones.

View example

Component properties

NameTypeDescription
type*"@toloka/condition.distance"Set component type.
fromstringThe coordinates that will be compared to the coordinates from the to property.
hintstringValidation error message that a Toloker will see.
maxnumberThe distance in meters by which the specified and sent coordinates may differ.
tostringThe coordinates that will be compared to the coordinates from the from property.
Contact support
Introduction
Getting started
Important tips
Useful recommendations
Working with Toloka
Projects
Pools
Tasks
Results
Project analysis
Toloka settings
Task interface
Template Builder
HTML/CSS/JS editor
Help and support
Frequently asked questionsTroubleshootingSupportGlossary