Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cluster not updating custom (rotationAngle & rotationOrigin) data fields in realtime #193

Open
lkgamor opened this issue Jan 31, 2021 · 1 comment

Comments

@lkgamor
Copy link

lkgamor commented Jan 31, 2021

#191

@brunolellis Please take a look at this issue and help me find a solution.
I really need your assistance asap

@TheVoxell
Copy link

TheVoxell commented Mar 14, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants