updateIconData Procedure
You can implement a plug-in to update the appearance of its button (or multiple buttons at once to make it look the same) on My Route without closing the plug-in page or interrupting its background operation.
The procedure has only the parameter iconData that is mandatory and has the same format as the iconData field for the close, sleep, and initEnd messages.
Example of the callProcedure message with the updateIconData
procedure:
{
"apiVersion": 1,
"method": "callProcedure",
"procedure": "updateIconData",
"callId": "123abc",
"params": {
"iconData": {
"color": "highlight",
"text": "117",
"image": new Blob([
'<?xml version="1.0"?>' +
'<svg xmlns="http://www.w3.org/2000/svg" version="1.2" baseProfile="tiny" viewBox="0 0 64 64">' +
'<rect x="16" y="16" width="32" height="32" fill="#fff" />' +
'</svg>'
], { type: 'image/svg+xml' });
}
}
}