Hello,
I would like to dynamically change assets from the CarAsset category, in which their icon on the Map would change based on if their ignition status is turned on or off (defined as field 239).
We implemented a color change for the asset via the manager_config.json, but would appreciate further customization to better represent the operating vehicles from the parked ones.
Regards,
João Pedro
Hi!
You can only configure the color of an asset marker based on the current attribute value.
Not sure whether you already did that, or only configured a static color for each asset type.
If not, see the documentation, and look for “Map - Marker config”. To quote:
This configures how the markers behave. They can either change their colour based on an attribute value (number, boolean, or string), show a label with or without units, and/or show the direction an asset is facing.
.
It’s unfortunately not possible to dynamically change the icon itself.
This is because the icon is configured in the static AssetDescriptor class.
The icon info is sent to the UI using the HTTP GET /api/master/model/assetInfos request,
so you could try to hack your way around this 