I'm still trying to get GMap to work in my test site.

I think I have installed all the 5 versions of GMap and Location with the exception that I did NOT install all of what I assume are the countries from /location/supported. I DID install the a few, including the one which appears to be the US.

I DO NOT get the error I as getting regarding the Google API key. I think I have set the appropriate location parameteres 31.967, -82.464

But, all I have is gray space in the area where the map should appear when I view the Build a GMap Macro, Node Locations and User Locations. I even went into the User Location and modified to include the admin location as 31.967, -82.464

Does anyone have any guidance on what I have done wrong?

Should I perhaps delete the concerned tables via phpMyAdmin and start again?

Thank you,

Joel

Comments

bdragon’s picture

Status: Active » Postponed (maintainer needs more info)

Can you post the settings blob from the HTML source of your map/macro page, please?

It appears in a script tag immediately after the map div, and looks like this:

Drupal.extend({ settings: { "gmap": { "map": { "width": .... bunch of stuff ... } } } });
reeljustice’s picture

This is what I have from viewing my page source on "Build GMap Macro":

Gmap macro creation
Drupal.extend({ settings: { "gmap": { "map": { "width": "640px", "height": "480px", "zoom": 3, "controltype": "Large", "maptype": "Map", "behavior": { "dynmarkers": true }, "line_colors": [ "#00cc00", "#ff0000", "#0000ff" ], "id": "map", "points": { }, "pointsOverlays": { }, "lines": { }, "querypath": "http://www.coastaloutdoors.com/infotest/map/query", "longitude": " -122.1419", "latitude": "37.4419" } } } });
tanc’s picture

I'm also getting a similar problem. I have gmap and locations working in every area (admin settings pages and node locations page) except for creating or editing a new node. When I view the (initially collapsed) locations section of my node edit page I see only a grey box where there should be a google map. All the google map controls are there, just no actual map image it seems. Nothing changes if I try and click on any buttons either, or zoom in or out.

Any ideas on what to try?

reeljustice’s picture

Tanc

Is your site or test site online? If so, could you give a link to the parts that are working and that aren't working? I'd like to compare your page source to mine as pointed out by bdragon above.

tanc’s picture

The site is still under construction but I do have a work in progress you can take a look at. I can't give you admin priviliges so you won't be able to see the only map that isn't currently working, which is the one related to creating or editing nodes.

Here is the code from the non-working (grey box) create node in case it helps:
<script type="text/javascript">Drupal.extend({ settings: { "gmap": { "loc1": { "width": "100%", "height": "400px", "zoom": 3, "controltype": "Small", "maptype": "Hybrid", "behavior": { "locpick": true }, "line_colors": [ "#00cc00", "#ff0000", "#0000ff" ], "id": "loc1", "lines": { }, "longitude": "", "latitude": "", "querypath": "http://ord.whitespace-studios.com/map/query" } } } });</script>

Here is the code from one of the working maps:
<script type="text/javascript">Drupal.extend({ settings: { "gmap": { "locmap": { "width": "100%", "height": "400px", "zoom": 3, "controltype": "Small", "maptype": "Hybrid", "behavior": { "nodrag": 0, "nokeyboard": 1 }, "line_colors": [ "#00cc00", "#ff0000", "#0000ff" ], "id": "locmap", "lines": { }, "longitude": "0", "latitude": "40", "markers": { }, "querypath": "http://ord.whitespace-studios.com/map/query" } } } });</script>

tanc’s picture

I solved my own problem. It was necessary for me to define the Locations fieldset in my custom content type as being collapsible but defaulting to not collapsed to start with. Having the fieldset collapsed was stopping the map from being drawn properly.

It seems as if everything is working for me now.

dgrant’s picture

Tanc it seems I have the same problem. How did you make it default to non collapsed?

dgrant’s picture

I found it. Now the map works.

The only thing missing is the address field where I can type an address, hit TAB and have the latitude and longitude update. It doesn't seem to want to figure out the long/lat from the other location fields.

reeljustice’s picture

How/where did you find it?

dgrant’s picture

Go to content types, edit your content type, click on Locative information to open up the location options, choose collapsible but not collapsed.

Anonymous’s picture

Thanks for the tip on the collapsable setting. This had annoyed my for months on my site. Now I just have to figure out how to get it to zoom in on a different default location.

Dewi Morgan’s picture

Got the version from the 6th (yesterday) and can't see any lines using the above code sample: I do see the circle, though.

After some testing, I see that the shape of the circle depends on the google maps window shape: if you have it wider than it is tall, your circles will be squashed vertically; if the view is square, the circles will be round; if the view is tall, then your circles will be stretched proportionately taller too.

So until that's fixed, use square views if you want round circles.

In my "Build a Gmap Macro" page, I have three "Click map" options - "Points" and "Circles" work OK, "Lines" does nothing - any idea what I'm missing? I just downloaded the 2007-May-06 version from http://ftp.osuosl.org/pub/drupal/files/projects/gmap-5.x-1.x-dev.tar.gz and untarred it over my existing system, checked if there were any DB updates (there were none), and tried to draw lines. What did I miss out? Do I need this "xmaps" thing mentioned on http://www.webgeer.com/gmapdemo ?

Dewi Morgan’s picture

Sorry, posted that to completely the wrong node.

bdragon’s picture

Status: Postponed (maintainer needs more info) » Fixed

All of the issues mentioned in this request have been fixed at some point in the past.

Regarding having a map inside a collapsed fieldset: Try the "collapsehack" behavior flag, it might help.

bdragon’s picture

oh, and ignore anything about xmaps, there is no Google Maps API v2 version of it (the version that later Drupal 4.7 and all Drupal 5 gmap uses)

Fortunately, most of the features of xmaps have been rolled into the official Google Maps API.

Anonymous’s picture

Status: Fixed » Closed (fixed)
code-brighton’s picture

I know this is an old thread, but having this issue with Drupal 7 default admin theme (Seven) setting to not collapsed seems to have no effect in this theme... any ideas anyone?

code-brighton’s picture

ok I managed a fix by disabling the vertical tabs in the Seven theme templete.php with info from here: http://drupal.org/node/1048644#comment-4057726 and applying not collapsed now gets rid of the map problem brilliant!

dunx’s picture

Getting the same thing on localhost (via http://mysite/). Key seemed okay (managed by Keys module) as when I changed it I got a pop up error. Tried everything noted here and on the main problem page http://drupal.org/node/1071244

I was getting grey maps with just the Google logo and T&Cs link on every page; nodes, admin, edit, in all themes.

I then spotted the collapsehack checkbox under the "Map Behavior [sic ;)] flags" on /admin/settings/gmap

Checked that, saved it away and hey presto! Maps galore.