Device Icon Always Black

Neil Romig2 years ago

I can't find any previous questions on this, but when using Firefox (Linux/Windows/Android) device icons do not show red/green as on the Android app or when using Chrome. Is this a problem with Firefox rendering of icons or have I misconfigured something?

Anton Tananaev2 years ago

The problem is that this doesn't work on Firefox:

https://github.com/traccar/traccar-web/blob/master/modern/src/map/core/mapUtil.js#L10-L29

If anyone has an alternative solution, feel free to suggest.

Nikolay 2 years ago

What does it mean that canvasTintImage does not work under Firefox?

I removed the condition in if(icon) and it seems to work.

Neil Romig2 years ago

Has Firefox been fixed? Sounds hopeful!

Anton Tananaev2 years ago

I think it used to throw exception on Firefox. If it's fixed, we probably need to figure out which version it was fixed in.

Neil Romig2 years ago

If you can provide a Traccar version with the revised code I'll run it through the Firefox versions.

Anton Tananaev2 years ago

It's ready for testing:

https://www.traccar.org/preview/

Neil Romig2 years ago

Using Windows 10 Home (22H2) and FirefoxPortable, colour icons are seen from version 90.0 onwards. Earlier versions show no icons.
Tested with versions 80, 85, 87, 89, 89.0.2, 90, 100 & 110.
Test consists of logging in, viewing map and a "today" replay of a random device.

Anton Tananaev2 years ago

Thanks for testing. Looks like it's pretty safe to keep it enabled. Versions older than 90 are less than 3%.

Neil Romig2 years ago

No problem, nice to have it fixed. Also checked OK on Fedora (latest version).