Questi parametri e i possibili valori delle proprietà per i rispettivi oggetti campo widget del dashboard consentono di configurare il widget Mappa nei metodi dashboard.create
e dashboard.update
.
The following parameters are supported for the Map widget.
Parameter | type | name | value |
---|---|---|---|
Refresh interval | 0 | rf_rate | 0 - No refresh; 10 - 10 seconds; 30 - 30 seconds; 60 - 1 minute; 120 - 2 minutes; 600 - 10 minutes; 900 - (default) 15 minutes. |
Source type | 0 | source_type | 1 - (default) Map; 2 - Map navigation tree. |
Map | 8 | sysmapid | Map ID. Parameter Map required if Source type is set to "Map". |
Linked widget reference | 1 | filter_widget_reference | Valid Map navigation tree widget parameter Reference value. Parameter Linked widget reference required if Source type is set to "Map navigation tree". |
I seguenti esempi mirano a descrivere solo la configurazione degli oggetti campo del widget dashboard per il widget Mappa. Per ulteriori informazioni sulla configurazione di un dashboard, vedere dashboard.create
.
Configure a Map widget that displays the map "1".
{
"jsonrpc": "2.0",
"method": "dashboard.create",
"params": {
"name": "My dashboard",
"display_period": 30,
"auto_start": 1,
"pages": [
{
"widgets": [
{
"type": "map",
"name": "Map",
"x": 0,
"y": 0,
"width": 18,
"height": 5,
"view_mode": 0,
"fields": [
{
"type": 8,
"name": "sysmapid",
"value": 1
}
]
}
]
}
],
"userGroups": [
{
"usrgrpid": 7,
"permission": 2
}
],
"users": [
{
"userid": 1,
"permission": 3
}
]
},
"id": 1
}
Response:
Configure a Map widget that is linked to a Map navigation tree widget.
{
"jsonrpc": "2.0",
"method": "dashboard.create",
"params": {
"name": "My dashboard",
"display_period": 30,
"auto_start": 1,
"pages": [
{
"widgets": [
{
"type": "map",
"name": "Map",
"x": 0,
"y": 5,
"width": 18,
"height": 5,
"view_mode": 0,
"fields": [
{
"type": 0,
"name": "source_type",
"value": 2
},
{
"type": 1,
"name": "filter_widget_reference",
"value": "ABCDE"
}
]
},
{
"type": "navtree",
"name": "Map navigation tree",
"x": 0,
"y": 0,
"width": 6,
"height": 5,
"view_mode": 0,
"fields": [
{
"type": 1,
"name": "navtree.name.1",
"value": "Element A"
},
{
"type": 1,
"name": "navtree.name.2",
"value": "Element B"
},
{
"type": 1,
"name": "navtree.name.3",
"value": "Element C"
},
{
"type": 1,
"name": "navtree.name.4",
"value": "Element A1"
},
{
"type": 1,
"name": "navtree.name.5",
"value": "Element A2"
},
{
"type": 1,
"name": "navtree.name.6",
"value": "Element B1"
},
{
"type": 1,
"name": "navtree.name.7",
"value": "Element B2"
},
{
"type": 0,
"name": "navtree.parent.4",
"value": 1
},
{
"type": 0,
"name": "navtree.parent.5",
"value": 1
},
{
"type": 0,
"name": "navtree.parent.6",
"value": 2
},
{
"type": 0,
"name": "navtree.parent.7",
"value": 2
},
{
"type": 0,
"name": "navtree.order.1",
"value": 1
},
{
"type": 0,
"name": "navtree.order.2",
"value": 2
},
{
"type": 0,
"name": "navtree.order.3",
"value": 3
},
{
"type": 0,
"name": "navtree.order.4",
"value": 1
},
{
"type": 0,
"name": "navtree.order.5",
"value": 2
},
{
"type": 0,
"name": "navtree.order.6",
"value": 1
},
{
"type": 0,
"name": "navtree.order.7",
"value": 2
},
{
"type": 8,
"name": "navtree.sysmapid.6",
"value": 1
},
{
"type": 1,
"name": "reference",
"value": "ABCDE"
}
]
}
]
}
],
"userGroups": [
{
"usrgrpid": 7,
"permission": 2
}
],
"users": [
{
"userid": 1,
"permission": 3
}
]
},
"id": 1
}
Response: