Title: Problem when loaded in background (tab)
Last modified: August 21, 2016

---

# Problem when loaded in background (tab)

 *  [Sonic750](https://wordpress.org/support/users/sonic750/)
 * (@sonic750)
 * [13 years ago](https://wordpress.org/support/topic/problem-when-loaded-in-background-tab/)
 * Hi,
    I’m using WP 3.5.1 and v3.5.3 – Free Edition of your great plugin. Unfortunately
   I have a little problem which I can’t solve by myself. If I’m using a mapsmarker
   shortcode anywhere in WP it works very well, but if I put the shortcode into 
   an area, that isn’t displayed by default (eg. a tab), the map doesn’t load correct.
 * You can see it here:
    [http://golfurlaub-mecklenburg.de/unterkunft/seehotel-heidehof/](http://golfurlaub-mecklenburg.de/unterkunft/seehotel-heidehof/)
 * In the first Tab (“Hotel”) the map shows fine.
    But in the last tab (“Karte”)
   it doesn’t. If I set the last tab as active by default, then the map loads correct,
   but no longer in the first tab. So it has to be some problem with loading in 
   the background.
 * I already disabled all other plugins, but it still didn’t work.
    Do you have 
   any clue what the problem could be?
 * thanks
    Sonic
 * [http://wordpress.org/extend/plugins/leaflet-maps-marker/](http://wordpress.org/extend/plugins/leaflet-maps-marker/)

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

 *  [FranceImage](https://wordpress.org/support/users/franceimage/)
 * (@franceimage)
 * [13 years ago](https://wordpress.org/support/topic/problem-when-loaded-in-background-tab/#post-3717871)
 * Hi,
 * It’s a google map issue: it does not initialize properly when the container is
   not displayed.
 * A trick is to replace ‘display; none’ with ‘position: absolute; left: -10000px;’
   in your .tab-pane css
 * Full explanation here: [https://code.google.com/p/wordpress-geo-mashup/issues/detail?id=333](https://code.google.com/p/wordpress-geo-mashup/issues/detail?id=333)
 * I prefer to create the map only when the tab becomes active (it prevents your
   GoogleMap counter from incrementing if your visitor does not click on the tab).
   However it’s not always possible when you use 3rd party plugins.
 * Does it make sense ?
 *  Thread Starter [Sonic750](https://wordpress.org/support/users/sonic750/)
 * (@sonic750)
 * [13 years ago](https://wordpress.org/support/topic/problem-when-loaded-in-background-tab/#post-3717876)
 * Thanks, this sounds reasonable.
    But I have the same problems with OpenStreetMaps.
   I’m gonna try your solution and report if it works.
 * Sonic

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

The topic ‘Problem when loaded in background (tab)’ is closed to new replies.

 * ![](https://ps.w.org/leaflet-maps-marker/assets/icon.svg?rev=970936)
 * [Leaflet Maps Marker (Google Maps, OpenStreetMap, Bing Maps)](https://wordpress.org/plugins/leaflet-maps-marker/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/leaflet-maps-marker/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/leaflet-maps-marker/)
 * [Active Topics](https://wordpress.org/support/plugin/leaflet-maps-marker/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/leaflet-maps-marker/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/leaflet-maps-marker/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Sonic750](https://wordpress.org/support/users/sonic750/)
 * Last activity: [13 years ago](https://wordpress.org/support/topic/problem-when-loaded-in-background-tab/#post-3717876)
 * Status: not resolved