Support » Plugin: Out of the Block: OpenStreetMap » Maps not showing properly

  • Resolved lovor


    I inserted block into custom theme I am developing based on underscores. There is an accordion block which I modified, based on atomic blocks accordion block.

    Inside this block I inserted your mapping block, but it does not behave well. In the backend everything looks fine. In the frontend, only some small portion of map is loaded, and the map loads when screen is resized. Also, when map is inserted as a full block, it loads correctly.

    Can you help to fix the issue?

    • This topic was modified 1 week ago by lovor.
    • This topic was modified 1 week ago by lovor.

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • lovor


    it seems it is due to map not showing by default, hidden inside <details> tag until open. It is a leaflet issue, not of your plugin. I believe remedy on my side would be to trigger map._onResize() when accordion element is opened.

    Plugin Author Giorgos Sarigiannidis



    I didn’t have the chance to try it, but if I had to make a guess from your description, I’d say that because the map is initially hidden, it never gets initialized. If that is the case, it isn’t the plugin’s issue, nor Leaflets. I remember having the same issue with Google Maps a few years ago. My workaround then was to reinitialize the map with some custom JavaScript when the tab containing the map was open.

    Again, this is just a guess and I might be wrong, as I haven’t tested it.

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