Toloka documentation


toloka.client.project.template_builder.view.MapViewV1 | Source code

    center: Optional[Union[BaseComponent, str]] = None,
    markers: Optional[Union[BaseComponent, List[Union[BaseComponent, Marker]]]] = None,
    polygons: Optional[Union[BaseComponent, List[Union[BaseComponent, Polygon]]]] = None,
    zoom: Optional[Union[BaseComponent, int]] = None,
    hint: Optional[Any] = None,
    label: Optional[Any] = None,
    validation: Optional[BaseComponent] = None,
    version: Optional[str] = '1.0.0'

Adds a map to your task.

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.

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

Parameters Description

Parameters Type Description
center Optional[Union[BaseComponent, str]]

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.

markers Optional[Union[BaseComponent, List[Union[BaseComponent, Marker]]]]

Specifies the markers present on the map.

polygons Optional[Union[BaseComponent, List[Union[BaseComponent, Polygon]]]]

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

zoom Optional[Union[BaseComponent, int]]

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

hint Optional[Any]

Hint text.

label Optional[Any]

Label above the component.

validation Optional[BaseComponent]

Validation based on condition.