Device Icon Always Black

Neil Romiga year 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 Tananaeva year 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 a year 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 Romiga year ago

Has Firefox been fixed? Sounds hopeful!

Anton Tananaeva year 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 Romiga year ago

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

Anton Tananaeva year ago

It's ready for testing:

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

Neil Romiga year 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 Tananaeva year ago

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

Neil Romiga year ago

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