13 Map

Description

These parameters and the possible property values for the respective dashboard widget field objects allow to configure the Map widget in dashboard.create and dashboard.update methods.

Parameters

The following parameters are supported for the Map widget.

Parametertypenamevalue
Refresh interval0rf_rate0 - No refresh;
10 - 10 seconds;
30 - 30 seconds;
60 - 1 minute;
120 - 2 minutes;
600 - 10 minutes;
900 - (default) 15 minutes.
Source type0source_type1 - (default) Map;
2 - Map navigation tree.
Map8sysmapidMap ID.

Parameter behavior:
- required if Source type is set to “Map”
Linked widget reference1filter_widget_referenceValid Map navigation tree widget parameter Reference value.

Parameter behavior:
- required if Source type is set to “Map navigation tree”

Examples

The following examples aim to only describe the configuration of the dashboard widget field objects for the Map widget. For more information on configuring a dashboard, see dashboard.create.

Configuring a Map widget

Configure a Map widget that displays the map “1”.

Request:

  1. {
  2. "jsonrpc": "2.0",
  3. "method": "dashboard.create",
  4. "params": {
  5. "name": "My dashboard",
  6. "display_period": 30,
  7. "auto_start": 1,
  8. "pages": [
  9. {
  10. "widgets": [
  11. {
  12. "type": "map",
  13. "name": "Map",
  14. "x": 0,
  15. "y": 0,
  16. "width": 18,
  17. "height": 5,
  18. "view_mode": 0,
  19. "fields": [
  20. {
  21. "type": 8,
  22. "name": "sysmapid",
  23. "value": 1
  24. }
  25. ]
  26. }
  27. ]
  28. }
  29. ],
  30. "userGroups": [
  31. {
  32. "usrgrpid": 7,
  33. "permission": 2
  34. }
  35. ],
  36. "users": [
  37. {
  38. "userid": 1,
  39. "permission": 3
  40. }
  41. ]
  42. },
  43. "id": 1
  44. }

Response:

  1. {
  2. "jsonrpc": "2.0",
  3. "result": {
  4. "dashboardids": [
  5. "3"
  6. ]
  7. },
  8. "id": 1
  9. }

Configuring a linked Map widget

Configure a Map widget that is linked to a Map navigation tree widget.

Request:

  1. {
  2. "jsonrpc": "2.0",
  3. "method": "dashboard.create",
  4. "params": {
  5. "name": "My dashboard",
  6. "display_period": 30,
  7. "auto_start": 1,
  8. "pages": [
  9. {
  10. "widgets": [
  11. {
  12. "type": "map",
  13. "name": "Map",
  14. "x": 0,
  15. "y": 5,
  16. "width": 18,
  17. "height": 5,
  18. "view_mode": 0,
  19. "fields": [
  20. {
  21. "type": 0,
  22. "name": "source_type",
  23. "value": 2
  24. },
  25. {
  26. "type": 1,
  27. "name": "filter_widget_reference",
  28. "value": "ABCDE"
  29. }
  30. ]
  31. },
  32. {
  33. "type": "navtree",
  34. "name": "Map navigation tree",
  35. "x": 0,
  36. "y": 0,
  37. "width": 6,
  38. "height": 5,
  39. "view_mode": 0,
  40. "fields": [
  41. {
  42. "type": 1,
  43. "name": "navtree.name.1",
  44. "value": "Element A"
  45. },
  46. {
  47. "type": 1,
  48. "name": "navtree.name.2",
  49. "value": "Element B"
  50. },
  51. {
  52. "type": 1,
  53. "name": "navtree.name.3",
  54. "value": "Element C"
  55. },
  56. {
  57. "type": 1,
  58. "name": "navtree.name.4",
  59. "value": "Element A1"
  60. },
  61. {
  62. "type": 1,
  63. "name": "navtree.name.5",
  64. "value": "Element A2"
  65. },
  66. {
  67. "type": 1,
  68. "name": "navtree.name.6",
  69. "value": "Element B1"
  70. },
  71. {
  72. "type": 1,
  73. "name": "navtree.name.7",
  74. "value": "Element B2"
  75. },
  76. {
  77. "type": 0,
  78. "name": "navtree.parent.4",
  79. "value": 1
  80. },
  81. {
  82. "type": 0,
  83. "name": "navtree.parent.5",
  84. "value": 1
  85. },
  86. {
  87. "type": 0,
  88. "name": "navtree.parent.6",
  89. "value": 2
  90. },
  91. {
  92. "type": 0,
  93. "name": "navtree.parent.7",
  94. "value": 2
  95. },
  96. {
  97. "type": 0,
  98. "name": "navtree.order.1",
  99. "value": 1
  100. },
  101. {
  102. "type": 0,
  103. "name": "navtree.order.2",
  104. "value": 2
  105. },
  106. {
  107. "type": 0,
  108. "name": "navtree.order.3",
  109. "value": 3
  110. },
  111. {
  112. "type": 0,
  113. "name": "navtree.order.4",
  114. "value": 1
  115. },
  116. {
  117. "type": 0,
  118. "name": "navtree.order.5",
  119. "value": 2
  120. },
  121. {
  122. "type": 0,
  123. "name": "navtree.order.6",
  124. "value": 1
  125. },
  126. {
  127. "type": 0,
  128. "name": "navtree.order.7",
  129. "value": 2
  130. },
  131. {
  132. "type": 8,
  133. "name": "navtree.sysmapid.6",
  134. "value": 1
  135. },
  136. {
  137. "type": 1,
  138. "name": "reference",
  139. "value": "ABCDE"
  140. }
  141. ]
  142. }
  143. ]
  144. }
  145. ],
  146. "userGroups": [
  147. {
  148. "usrgrpid": 7,
  149. "permission": 2
  150. }
  151. ],
  152. "users": [
  153. {
  154. "userid": 1,
  155. "permission": 3
  156. }
  157. ]
  158. },
  159. "id": 1
  160. }

Response:

  1. {
  2. "jsonrpc": "2.0",
  3. "result": {
  4. "dashboardids": [
  5. "3"
  6. ]
  7. },
  8. "id": 1
  9. }

See also