Plugin Author
tinuzz
(@tinuzz)
I’d have to dive into this to give you a meaningful answer, but…
As the problem seems to be only related to the fullscreen functionality, I suspect the problem has to do with the fullscreen control, and the fact that both plugins use a different one.
Trackserver uses https://github.com/Leaflet/Leaflet.fullscreen/, OS Datahub Maps uses https://github.com/brunob/leaflet.fullscreen . They may be incompatible, but I did not do any testing to confirm this.
As both Leaflet plugins seem to be interchangeable in the way they are used, you could try to disable loading the fullscreen control from Trackserver by commenting out lines 321 and 322 in class-trackserver.php. In theory, that would not make a difference, because the other control would still be loaded, and the code that Trackserver uses to instantiate it would still work. I did not test this though.
Can you try this?
No that didn’t work, and it disabled the Trackserver map!
I did ask the other plugin’s author some time ago and he was unable to figure it out. The problem seems to have gone on through updates.
Plugin Author
tinuzz
(@tinuzz)
Hm, that probably means that trackserver.js is loaded before OS Datahub’s javascript.
One more thing to try before I will try and find the time to reproduce the issue:
On line 329 of class-trackserver.php, change the 3rd argument of the function call, which is now array()
, to array('osmap-fullscreen')
. Theoretically, this should cause the fullscreen control from OS Datahub to be loaded first.
Edit: do this with the previous suggestion (commenting out those two lines) ALSO applied!
-
This reply was modified 9 months ago by
tinuzz.
No that just disabled the OS DataHub maps AND the Trackserver map.
I have tried it in different browsers and machines so I don’t think it’s just me.
Plugin Author
tinuzz
(@tinuzz)
Well, if I find some time (not today, sorry), I’ll try to reproduce it myself and see if I find the cause. I can see how this is annoying, but unfortunately, the cause may be hard to find.
I see that when the first map is full screen, everything looks kind of normal if you look at how the browser represents the relevant elements, but it seems that the right events for downloading map tiles aren’t triggered. Rather than being a problem with the fullscreen control, this could well be a problem in core Leaflet, although I really don’t see (like yourself) how this could only surface in the first map and not in the others.
You can always try to upgrade Leaflet in Trackserver to 1.9.4, just copy over the JS and CSS, and update the version string in Trackserver.
In fact, you could even replace Trackserver with the development version from Github, which already includes Leaflet v1.9.4.
Hope this helps,
Martijn.
Thanks. I’ll try that later on and see what happens.
I couldn’t wait… and no, no difference! (dev version). Exasperating!