# > Map object

The following objects are directly related to the `map` API.

### Map

The map object has the following properties.

|Property|Type|Description|
|--------|----|-----------|
|sysmapid|string|*(readonly)* ID of the map.|
|**height**<br>(required)|integer|Height of the map in pixels.|
|**name**<br>(required)|string|Name of the map.|
|**width**<br>(required)|integer|Width of the map in pixels.|
|backgroundid|string|ID of the image used as the background for the map.|
|expand\_macros|integer|Whether to expand macros in labels when configuring the map.<br><br>Possible values:<br>0 - *(default)* do not expand macros;<br>1 - expand macros.|
|expandproblem|integer|Whether the the problem trigger will be displayed for elements with a single problem.<br><br>Possible values:<br>0 - always display the number of problems;<br>1 - *(default)* display the problem trigger if there's only one problem.|
|grid\_align|integer|Whether to enable grid aligning.<br><br>Possible values:<br>0 - disable grid aligning;<br>1 - *(default)* enable grid aligning.|
|grid\_show|integer|Whether to show the grid on the map.<br><br>Possible values:<br>0 - do not show the grid;<br>1 - *(default)* show the grid.|
|grid\_size|integer|Size of the map grid in pixels.<br><br>Supported values: 20, 40, 50, 75 and 100.<br><br>Default: 50.|
|highlight|integer|Whether icon highlighting is enabled.<br><br>Possible values:<br>0 - highlighting disabled;<br>1 - *(default)* highlighting enabled.|
|iconmapid|string|ID of the icon map used on the map.|
|label\_format|integer|Whether to enable advanced labels.<br><br>Possible values:<br>0 - *(default)* disable advanced labels;<br>1 - enable advanced labels.|
|label\_location|integer|Location of the map element label.<br><br>Possible values:<br>0 - *(default)* bottom;<br>1 - left;<br>2 - right;<br>3 - top.|
|label\_string\_host|string|Custom label for host elements.<br><br>Required for maps with custom host label type.|
|label\_string\_hostgroup|string|Custom label for host group elements.<br><br>Required for maps with custom host group label type.|
|label\_string\_image|string|Custom label for image elements.<br><br>Required for maps with custom image label type.|
|label\_string\_map|string|Custom label for map elements.<br><br>Required for maps with custom map label type.|
|label\_string\_trigger|string|Custom label for trigger elements.<br><br>Required for maps with custom trigger label type.|
|label\_type|integer|Map element label type.<br><br>Possible values:<br>0 - label;<br>1 - IP address;<br>2 - *(default)* element name;<br>3 - status only;<br>4 - nothing.|
|label\_type\_host|integer|Label type for host elements.<br><br>Possible values:<br>0 - label;<br>1 - IP address;<br>2 - *(default)* element name;<br>3 - status only;<br>4 - nothing;<br>5 - custom.|
|label\_type\_hostgroup|integer|Label type for host group elements.<br><br>Possible values:<br>0 - label;<br>2 - *(default)* element name;<br>3 - status only;<br>4 - nothing;<br>5 - custom.|
|label\_type\_image|integer|Label type for host group elements.<br><br>Possible values:<br>0 - label;<br>2 - *(default)* element name;<br>4 - nothing;<br>5 - custom.|
|label\_type\_map|integer|Label type for map elements.<br><br>Possible values:<br>0 - label;<br>2 - *(default)* element name;<br>3 - status only;<br>4 - nothing;<br>5 - custom.|
|label\_type\_trigger|integer|Label type for trigger elements.<br><br>Possible values:<br>0 - label;<br>2 - *(default)* element name;<br>3 - status only;<br>4 - nothing;<br>5 - custom.|
|markelements|integer|Whether to highlight map elements that have recently changed their status.<br><br>Possible values:<br>0 - *(default)* do not highlight elements;<br>1 - highlight elements.|
|severity\_min|integer|Minimum severity of the triggers that will be displayed on the map.<br><br>Refer to the [trigger "severity" property](/manual/api/reference/trigger/object#trigger) for a list of supported trigger severities.|
|show\_unack|integer|How problems should be displayed.<br><br>Possible values:<br>0 - *(default)* display the count of all problems;<br>1 - display only the count of unacknowledged problems;<br>2 - display the count of acknowledged and unacknowledged problems separately.|
|userid|string|Map owner user ID.|
|private|integer|Type of map sharing.<br><br>Possible values:<br>0 - public map;<br>1 - *(default)* private map.|

### Map element

The map element object defines an object displayed on a map. It has the
following properties.

|Property|Type|Description|
|--------|----|-----------|
|selementid|string|*(readonly)* ID of the map element.|
|**elementid**<br>(required)|string|ID of the object that the map element represents.<br><br>Required for host, host group, trigger and map type elements.|
|**elementtype**<br>(required)|integer|Type of map element.<br><br>Possible values:<br>0 - host;<br>1 - map;<br>2 - trigger;<br>3 - host group;<br>4 - image.|
|**iconid\_off**<br>(required)|string|ID of the image used to display the element in default state.|
|areatype|integer|How separate host group hosts should be displayed.<br><br>Possible values:<br>0 - *(default)* the host group element will take up the whole map;<br>1 - the host group element will have a fixed size.|
|application|string|Name of the application to display problems from. Used only for host and host group map elements.|
|elementsubtype|integer|How a host group element should be displayed on a map.<br><br>Possible values:<br>0 - *(default)* display the host group as a single element;<br>1 - display each host in the group separately.|
|height|integer|Height of the fixed size host group element in pixels.<br><br>Default: 200.|
|iconid\_disabled|string|ID of the image used to display disabled map elements. Unused for image elements.|
|iconid\_maintenance|string|ID of the image used to display map elements in maintenance. Unused for image elements.|
|iconid\_on|string|ID of the image used to display map elements with problems. Unused for image elements.|
|label|string|Label of the element.|
|label\_location|integer|Location of the map element label.<br><br>Possible values:<br>-1 - *(default)* default location;<br>0 - bottom;<br>1 - left;<br>2 - right;<br>3 - top.|
|sysmapid|string|*(readonly)* ID of the map that the element belongs to.|
|urls|array|Map element URLs.<br><br>The map element URL object is [described in detail below](object#map_element_url).|
|use\_iconmap|integer|Whether icon mapping must be used for host elements.<br><br>Possible values:<br>0 - do not use icon mapping;<br>1 - *(default)* use icon mapping.|
|viewtype|integer|Host group element placing algorithm.<br><br>Possible values:<br>0 - *(default)* grid.|
|width|integer|Width of the fixed size host group element in pixels.<br><br>Default: 200.|
|x|integer|X-coordinates of the element in pixels.<br><br>Default: 0.|
|y|integer|Y-coordinates of the element in pixels.<br><br>Default: 0.|

#### Map element URL

The map element URL object defines a clickable link that will be
available for a specific map element. It has the following properties:

|Property|Type|Description|
|--------|----|-----------|
|sysmapelementurlid|string|*(readonly)* ID of the map element URL.|
|**name**<br>(required)|string|Link caption.|
|**url**<br>(required)|string|Link URL.|
|selementid|string|ID of the map element that the URL belongs to.|

### Map link

The map link object defines a link between two map elements. It has the
following properties.

|Property|Type|Description|
|--------|----|-----------|
|linkid|string|*(readonly)* ID of the map link.|
|**selementid1**<br>(required)|string|ID of the first map element linked on one end.|
|**selementid2**<br>(required)|string|ID of the first map element linked on the other end.|
|color|string|Line color as a hexadecimal color code.<br><br>Default: `000000`.|
|drawtype|integer|Link line draw style.<br><br>Possible values:<br>0 - *(default)* line;<br>2 - bold line;<br>3 - dotted line;<br>4 - dashed line.|
|label|string|Link label.|
|linktriggers|array|Map link triggers to use as link status indicators.<br><br>The map link trigger object is [described in detail below](object#map_link_trigger).|
|sysmapid|string|ID of the map the link belongs to.|

#### Map link trigger

The map link trigger object defines a map link status indicator based on
the state of a trigger. It has the following properties:

|Property|Type|Description|
|--------|----|-----------|
|linktriggerid|string|*(readonly)* ID of the map link trigger.|
|**triggerid**<br>(reqiuired)|string|ID of the trigger used as a link indicator.|
|color|string|Indicator color as a hexadecimal color code.<br><br>Default: `DD0000`.|
|drawtype|integer|Indicator draw style.<br><br>Possible values:<br>0 - *(default)* line;<br>2 - bold line;<br>3 - dotted line;<br>4 - dashed line.|
|linkid|string|ID of the map link that the link trigger belongs to.|

### Map URL

The map URL object defines a clickable link that will be available for
all elements of a specific type on the map. It has the following
properties:

|Property|Type|Description|
|--------|----|-----------|
|sysmapurlid|string|*(readonly)* ID of the map URL.|
|**name**<br>(required)|string|Link caption.|
|**url**<br>(required)|string|Link URL.|
|elementtype|integer|Type of map element for which the URL will be available.<br><br>Refer to the [map element "type" property](object#map_element) for a list of supported types.<br><br>Default: 0.|
|sysmapid|string|ID of the map that the URL belongs to.|

### Map user

List of map permissions based on users. It has the following properties:

|Property|Type|Description|
|--------|----|-----------|
|sysmapuserid|string|*(readonly)* ID of the map user.|
|**userid**<br>(required)|string|User ID.|
|**permission**<br>(required)|integer|Type of permission level.<br><br>Possible values:<br>2 - read only;<br>3 - read-write;|

### Map user group

List of map permissions based on user groups. It has the following
properties:

|Property|Type|Description|
|--------|----|-----------|
|sysmapusrgrpid|string|*(readonly)* ID of the map user group.|
|**usrgrpid**<br>(required)|string|User group ID.|
|**permission**<br>(required)|integer|Type of permission level.<br><br>Possible values:<br>2 - read only;<br>3 - read-write;|
