The new SVG system allows cars to rotate on the map. However, there is a bug that seems to happen with cars that do not have headings, where the car does not get rendered.
I tracked down the issue with this logic; it's that the setCourse call in line 1657 happens before the image is ready, so then the one that sets the course to 90 by default doesn't run, since marker.rotated becomes true. Now, we will not update from gps heading unless the car is already rotated.
Additionally, while running this through the debugger, I noticed a bunch of 404 errors originating from the file list in service_worker.js; I've gone ahead and cleaned up all the files that were listed there which no longer exist.
Not completely clear what service_worker.js is, but removing the names of the files which have subsequently been deleted seems to have removed the errors.
service_worker.js is used to in theory speed up the site with a custom caching policy for specific files, if it works well however is another question...
The new SVG system allows cars to rotate on the map. However, there is a bug that seems to happen with cars that do not have headings, where the car does not get rendered.
I tracked down the issue with this logic; it's that the setCourse call in line 1657 happens before the image is ready, so then the one that sets the course to 90 by default doesn't run, since
marker.rotated
becomes true. Now, we will not update from gps heading unless the car is already rotated.Additionally, while running this through the debugger, I noticed a bunch of 404 errors originating from the file list in service_worker.js; I've gone ahead and cleaned up all the files that were listed there which no longer exist.
Not completely clear what service_worker.js is, but removing the names of the files which have subsequently been deleted seems to have removed the errors.