I have a grey background for my map in views.

I get the grey background if I use

No manager (use GMap API directly)
Google's GMarkerManager
Gmaps Utility Library MarkerManager- downloaded the js file)

If i use these (and of course i don't download the *js file needed), I get the map with no marker
Jef Poskanzer's Clusterer
Martin Pearman's ClusterMarker

any help on this one?

Weird.

I have $script at the end of page.tpl.php.

Chris

CommentFileSizeAuthor
#2 463160-2-img-max-width-none.patch285 bytesalberto56
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

konrad_u’s picture

I have the same issue, however when I change my theme to default GARLAND everything works fine. So I know where my problem is. Just have to find out how to fix my tpl

alberto56’s picture

Title: Grey background for map » Avoid Grey background for map by forcing .gmap img max-width none
Category: bug » feature
Status: Active » Needs review
FileSize
285 bytes

If your theme defines

img {
max-width: 100%;
}

IE, and FF will non display your map data, only a grey box.
To see if you are suffering from this problem, change your theme as described in the comment #1, above.
To avoid this you might want to add the following line to your theme:

/* IE and FF will display the map as a grey box if max-width is set to 100% for img tag within .gmap. */
.gmap img {
  max-width: none #important;
}

Here is a patch which adds the above lines to the module itself, thus avoiding future problems on all themes.

Cheers

Albert
keyword: gray, grey

alberto56’s picture

Title: Avoid Grey background for map by forcing .gmap img max-width none » Avoid Grey map background on IE & FF by forcing .gmap img max-width none
jan.werkhoven’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev

This CSS fix also works in version 7.x-1.x-dev.

.gmap img {
  max-width: none #important;
}

Thank you so much for sharing Alberto56, you mad my day by fixing this bug!

podarok’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev
Status: Needs review » Fixed

#2 commited to 7.x-2.x branch

also commited to 7.x-1.x branches for backport support

hkirsman’s picture

Status: Fixed » Needs review

There's a typo. It should be written "max-width: none !important;" and not "max-width: none #important;".

podarok’s picture

Status: Needs review » Fixed

this is fixed in all 6.x and 7.x branches

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.