Open lkgamor opened 3 years ago
Hi Ikgamor,
I dont have these issues.
I created a statusmarker icon that rotates font awesome icons according to the data
createIcon(data) {
const location = data.location;
const iconPath = data.iconId ? getIconPath(data.iconId)[1] : '/assets/images/icons/vista/Trucks/32x32/TankerTruck_Black.png';
const [markerIcon, heading] =
(location.deviceState === 6) ? ['fa-rss', 0] :
(location.deviceState === 1 && location.headingInDegrees > 0) ? ['fa-arrow-circle-up', location.headingInDegrees] :
(location.deviceState === 2) ? ['fa-stop-circle', 0] :
(location.deviceState === 3) ? ['fa-pause-circle', 0] :
(location.deviceState === 4) ? ['fa-signal', 0] :
(location.deviceState === 5) ? ['fa-power-off', 0] :
(location.deviceState === 0) ? ['fa-question-circle', 0] : ['fa-play-circle', 0];
return L['StatusMarker'].icon({
iconUrl: iconPath,
icon: markerIcon,
markerColor: colorMapper(location.deviceState),
rotate: heading,
shape: 'circle',
prefix: 'fas'
});
}
can you log when the createIcon is called? if it is called it should render an updated icon
191
@brunolellis Please take a look at this issue and help me find a solution. I really need your assistance asap