Toloka documentation

field.map

Adds a map to your task and allows Tolokers to set markers on it.

Use this component to set the targets for the tasks with the markers, select the areas with polygons. Specify the position and colors for the elements on the map.

A Toloker can set markers on the map, so you can use this component to create tasks to find a specific places on maps or for Tolokers to check other Tolokers (for example, to check field tasks).

You can set the following map properties: scale, position of the map center, label, and hint for the Tolokers.

Component properties

Name

Type

Description

type*

"field.map"

Set component type

data*

writable

Data with values that will be processed or changed.

label

string

Label above the component.

center*

string

Determines the position of the map center. Specify the coordinates in the string format, for example, "29.748713,-95.404287", or use the data.location component to set the center of the map to the Toloker's current position.

editableMarkerLabel

string

The label for the marker that Toloker places or edits

hint

string

Hint text.

markers

array

Specifies the markers present on the map.

markers[]

object

The list of the markers set on the map.

markers[].color

string

Determines the marker color. Use the hexadecimal values preceded by the # sign to specify the color.

markers[].label

string

The label for the marker that tells Tolokers what this marker is for and helps distinguish it from other markers.

markers[].position*

string

Determines the marker position. Specify the coordinates in the string format, for example, "29.748713,-95.404287", or use the data.location component to set the marker to the Toloker's current position.

polygons

array

Specifies the polygonal objects that you can use to select areas on the map.

polygons[]

object

The list of the polygonal selection areas on the map.

polygons[].color

string

Determines the polygonal selection area color. Use the hexadecimal values preceded by the # sign to specify the color.

polygons[].points

array

The list of the polygonal selection area points.

polygons[].points[]

string

Determines the position and shape of the polygonal selection areas. Specify the coordinates in the string format, for example, "29.748713,-95.404287".

validation

condition

Validation based on condition.

zoom

integer

The map initial scale. Use the values from 0 to 19. Bigger values give a more detailed map view.