Hosting cdn files on local server not working in a customized copy of v6.

Joystick8 months ago

Hi all,

On v5.12 I used to host the cdn files on my local server but it does not work on v6.
In useMapStyles.js I use the file path glyphs: './traccar-cdn/map/fonts/{fontstack}/{range}.pbf',

Does anyone else have the same issue that could assist with some pointers?
I have customized code but as I mentioned it worked on v5.12, which was also customized.

If I revert back to using glyphs: 'https://cdn.traccar.com/map/fonts/{fontstack}/{range}.pbf', it works fine.

Any help would be appreciated.

Joystick8 months ago

Also just sharing one of the errors I receive in web dev.

https://www.mydomain.com/traccar-cdn/map/fonts/Open%20Sans%20Regular,Arial%20Unicode%20MS%20Regular/0-255.pbf 404 (Not Found)
Track-trace8 months ago

If Its 404 the path does not seem to be correct.

Joystick8 months ago

Correct, but it is the same path as what I used in v5.12 where it worked fine.
Plus it is the same path I used in earlier versions where it also worked.

jinzo8 months ago

The map font handling changed quite recently: https://github.com/traccar/traccar-web/commit/6b0dfe921078d72e661bad8f14ecde224f5c2e8a

So now it uses the default map fonts, and I guess you don't have the fonts/glyphs for that updated. So head over to: https://github.com/traccar/traccar-cdn/tree/master/map/fons and update your cdn folder.

Joystick8 months ago

Hi jinzo,

Thank you so much, that solved my problem.