Context:
Any AzurPoly aircraft during free flight.
Bug description:
Each of our aircraft has a custom EFB (HTML gauge) with an interactive map made using Leaflet (JS library), like several other developers have.
The map is flickering constantly, while it never does in MFS 2020.
Do you have any clue about what could explain this bug?
Did anything change at all with Coherent GT implementation between MFS 2020 and MFS 2024?
I did not find anything relevant using the debugger.
Repro steps:
Load the AzurPoly BD-5J (FS2020 package) inside FS2024 Community folder.
Launch a free flight and open the map of the EFB.
Attachments:
Private attachments: Sending you our BD-5J package to reproduce.
I was porting an InGamePanel (from MSFS 2020) to a new EFB app (MSFS 2024) and I’ve also encountered this behavior while using Leaflet.js.
For whatever reason, it only seems to affect the basemap (perhaps anything in Leaflet’s tile layer “map pane”? or maybe related to how Leaflet manipulates the DOM when loading tiles?) – regardless, the other controls and layers seem fine. In addition to flickering, sometimes it can get stuck not displaying the basemap at all. This behavior seems to exhibit more frequently when the map is being panned, but it doesn’t seem super consistent?
For what it’s worth, I have my map loaded inside an iframe, and when viewing the map from external browsers I don’t see the same behavior.
@FlyingRaccoon I hate to be pushy as I realize this is launch week (I feel your pain, and ours;-) and there’s an extensive list of issues, but this map flickering issue is important for a lot of us as useable maps are a core function to enable many other tasks, not just “map reading”.
Any sense of when a fix may be deployed for it? Thanks!
Doing some more dev/testing I noticed that the rate of flickering varies depending on the aircraft’s glass cockpit integration, and type.
The Joby was the worst I’ve seen, almost epilepsy inducing it was so fast, but by comparison the Airtractor was almost like MSFS 2020. Other planes with G1000 or G3000 have the ~sub second flickering, but not to the extent of the rapidity I saw with the Joby.
As we don’t have any idea of when this may be fixed I’ve been trying to find alternatives, or discover why leaflet maps are flickering to a degree that makes them unusable for users. An update on things I’ve discovered about this issue.
I looked at maplibre, but it uses WebGL which isn’t supported by CoherentGT.
OpenLayers is next best, but the recent changes make it incompatible with the browser version of CoherentGT and I haven’t yet found a way to integrate it.
I did find an older legacy version of OpenLayers V5.3.0 which works in CoherentGT (current version of OL is V10.3.0) via Getting Started with OpenLayers 5 - DEV Community and interestingly there is zero flickering. In the image below my leaflet app on the left is flickering black while the rh legacy OL map is rock solid with zero flickering.
Leaflet feels a little faster to zoom, and is much easier to work with. OL is great too, but comes at a complexity cost.
Still broken with leaflet in V1.2.7.0, Openlayers aok
Update 13/1/2024
Well, that’s nice.
I went to do some testing in MSFS 2020, there was an update to download (not sure from when, but last used in late dec and no updates then), and now resizing the toolbar pane breaks openlayers with a new bug. Worked perfectly before.
Oh well, easier to just remove support for 2020.
Dreading to see that happen in 2024 now.
Has anyone found a fix for the leaflet glitching in 2024?
haha I’d love to claim the credit, but it was Felte in the Sim Soaring Club who has a map-based multiplayer addon (SSC-Tracker) that discovered the workaround, and saved me countless hours.