• Resolved timjh

    (@timjh)


    This is a problem I have on all my maps, but is most easily shown on the linked page, which has a simple map: [osmap extent="SP345385|SP365365"]

    On Firefox, Chrome and Edge the map initially displays with tiles missing at the right hand edge. The missing tiles appear immediately on resizing the window by dragging any edge.

    While the tiles are missing, dragging the map itself to the left brings up some of the missing tiles, but still leaves grey space on the right. However, after resizing the window, tiles are never missing!

    Perhaps it is something in my CSS, but do you have any thoughts?

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author skirridsystems

    (@skirridsystems)

    Strange. I have tried in Chrome, Firefox and Edge and I can’t reproduce the problem. My monitor is 1920×1080. I’ve tried with the browser window maximised and also with smaller and greater (over 2 monitors) window widths and refreshed the view but I never see anything missing.

    Thread Starter timjh

    (@timjh)

    Weird, then. But it’s not just my desktop machine – I see the same problem on my laptop. I’ll keep looking; I’ve got a hint of a problem in my custom JS, though that may not explain why you can’t see it!

    Thread Starter timjh

    (@timjh)

    Solved. My JS was inserting a CSS class that as a side effect caused the map container to expand after the map had been drawn; I found the JS that triggered this and inserted after it:

    if (typeof osDataHubMap !== 'undefined') {
          osDataHubMap.mapList.forEach( function(e) {
            e.map.invalidateSize(); // redraw the map
          });
        }

    Not an ideal approach, but it seemed to be easier than trying to make my JS run before the map is drawn.

    Plugin Author skirridsystems

    (@skirridsystems)

    Interesting. That’s the same reason that maps don’t work in popups – they get ‘drawn’ while the popup is invisible and then when the CSS is changed to ‘display’ it shows a map with only one tile drawn.

    It’s on my todo list to find a solution, but it’s a pain as it involves detecting when the map has changed without forcing unnecessary invalidates.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Tiling is incomplete’ is closed to new replies.