Hi,

I first thought this should be an issue of my theme, so I posted it as a bug for the K2 theme (http://drupal.org/node/93676), but then again I think the output of the gmap module should be somewhat consistent, so maybe my problem might be considered here as well.

The problem is that gmaps generally work with my theme (i.e. gmaps from views, or in blocks), but if I use a gmap macro, only a gray window with the navigation controls is shown. This does not happen if I use bluemarine as a theme. For examples, see here: http://www.marzeion.com/complete_map (working, from views) and here http://www.marzeion.com/test_gmap_macro (not working, from a macro).

Any help is greatly appreciated!

Ben.

Comments

benma’s picture

Just found out that the macros do work in IE6 - although they have a gray bar across the top. Any ideas?

Ben.

webgeer’s picture

Looking at the source it looks like the latitude and longitude are reversed. Not sure why that happened. THe center was set as:

map.setCenter(new GLatLng(20.519644202728962, -157.510986328125), 7);

which of course should have been the other way around. I suggest looking at the macro and flipping the lat, long and seeing if that works.

webgeer’s picture

Sorry about that. It shouldn't be the other way around. What was I thinking...

It must be something in the css settings. If I load the source code created by that page into my page at:

http://www.webgeer.com/test.html

It works fine. The only thing I have changed in the source code is the key.

benma’s picture

Hi webgeer,

I was thinking it might be related to the css. I guess it means the problem is unrelated to the gmap.module - I will try to track it down, and post here in case I'm succesfull.

Thanks for the great module, and the great support!

Ben.

benma’s picture

Status: Active » Closed (fixed)

I figured it out - by stupid trial and error, but now it works:

In the K2 theme style.css, you will find the following:

.primary .itemtext img {
	margin-left: -5px;
	padding: 4px;
	border: 1px solid #ccc;
	max-width: 100%;
	}*/

Removing the line
max-width: 100%;
solves the problem.

Cheers,
Ben.

ibeeby’s picture

I am having a similar problem - I have installed map and gmap under Drupal 4.7 with the Andreas01 theme and I only get a gray street map displayed, despite the fact that the macro calls for 'Hybrid' display.

I saw the earlier post relating to the theme .css entry for max-width=100% but there is no such command in the style.css nor in the Andreas01.css files.

Has anyone any suggestions? I built the macro using the map function and compared it with that generated using an external macro generator (helpfully on one of the drupal sites) and the two are similar save for the exact Lat and Long. There is not issue with reversal here - the street map is where I hope it to be - absent is the satellite overlay.

Is there some simple checklist that I can go through to ensure that things are all set up correctly?

The page on which I am having the problem is http://wye-house.com/node/14

Any suggestions much appreciated.

Best Regards

Ian Beeby