views:

64

answers:

1

I am using Tabs and CCK Fieldgroup Tabs module to put node GMap CCK location map in a tab. When I put GMap location map in one of the node tabs (Tabs module) other than first one (default), the map view does not centre properly the marker. It slides one width off the screen to the east (right). I need to press "scroll right" arrow once on the map controls to have the marker centred properly.

I have read all the Drupal threads touching this issue and all I found are suggestions to play with resizeMap() function. Anyone knows where exactly to play with it? Where to apply the change to the code to accomplish the task in the least invasive way?

Attached screenshots: Screenshot just after switching to the tab with Gmap map

After scrolling once marker is in acceptable position

A: 

What solved my problem was to override tabs ccs styles from drupal-tab.css:

.ui-tabs-hide  {
left:-15000px;
position:absolute;
top:-15000px;
visibility:hidden;
}

to:

.ui-tabs-hide {
position:absolute;
visibility:hidden;
left: 50%;
top:-15000px;
}

in my theme css. The crucial part is to override left css property of position:absolute. Works for firefox, safari and google chrome. Not tested in IE as I am sitting on Mac ;-) If anyone knows better solution for this map display issue please share.

Lukasz