Map shows gray areas on page load – everything fine on resize
-
Hi,
when my page loads, it will only show a partial map which is not centered. When I resize the window, everything works as expected.
I embed the map with shortcode [locations_map].
I use the following JQuery functions:
jQuery(‘document’).ready(function(){
var width = jQuery( window ).width() / 2.5 + “px”;
var height = jQuery( window ).height() – 100 + “px”;jQuery(‘.em-osm-map-multiple’).css(‘width’, width);
jQuery(‘.em-osm-map-multiple’).css(‘height’, height);
});and basically the same for window resize.
Why does this work on resize but not on page load?
The page I need help with: [log in to see the link]
- The topic ‘Map shows gray areas on page load – everything fine on resize’ is closed to new replies.