Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
As soon as you put the OpenLayers map in a vertical tab, the layers are not being displayed anymore.
Moving the map out of the tab fixes the problem.
Still, this is annoying.
Comments
Comment #2
m.stentaI'm willing to bet that this is the same thing as #2644580: Maps with Google layers break when loaded in invisible element
Can you confirm by doing the following:
1. Click on the Vertical Tab that contains the map, to ensure that the map's DIV is visible.
2. Open up Console in Chrome/Firefox
3. Find the CSS ID of the DIV containing your map - the div should also have a "openlayers-map" class. You need the ID of that DIV.
4. Enter the following commands into console (replace
[[DIV-ID]]
with the ID you found):Does that cause the map to show up?
Comment #3
stopopol CreditAttribution: stopopol commentedResizing the window itself also makes the map visible, so yes. It's a duplicate.
Comment #4
m.stentaOk cool - thanks for confirming. We should probably generalize that other issue.
It seems that whenever a map is built inside a hidden div it has the same issue.