• If I put a Trackserver map anywhere on the same page as an OS DataHub Maps plugin map, the first OS DataHub Map of several will not fullscreen properly. Any subsequent OS DataHub Map on the page works fine! I’ve gone over the page source comparing with and without a Trackserver map and can’t find any clue apart from the fact that both plugins are using a different version of Leaflet – Trackserver is 1.9.3 and OS DataHub Maps 1.9.4 and somehow this is causing the problem. I can’t think of a way to test this. How on earth can it affect only the first map?!
    Any ideas?
    Thanks!

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • 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?

    Thread Starter digbymaass

    (@digbymaass)

    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 1 month, 1 week ago by tinuzz.
    Thread Starter digbymaass

    (@digbymaass)

    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.

    Thread Starter digbymaass

    (@digbymaass)

    Thanks. I’ll try that later on and see what happens.

    Thread Starter digbymaass

    (@digbymaass)

    I couldn’t wait… and no, no difference! (dev version). Exasperating!

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.