There is a javascript error, and the map doesn't show. Same thing happens in the demo sites of this module.
The errors are:

_mFlags is not defined
http://www.google.com/mapfiles/55a/maps2.api/main.js
Line 300

GLatLngBounds is not defined
http://photo-tips.ca/gmapfeeddemo
Line 132

Comments

afagioli’s picture

Have you got this error?

Error: _mFlags is not defined
Source File: http://www.google.com/mapfiles/55a/maps2.api/main.js
Line: 300

I'm having the same problem, on sites that used to happily run the gmap module for months, till a few hours ago

After a quick debug, since all my "stuff" is in order, I've started to think about an update of the http://www.google.com/mapfiles/55a/maps2.api/main.js

steve hanson’s picture

You're not alone. There seems to be some belief that this MAY be because Google has started throttling V1 API requests - but that' just speculation at the moment.

Mine all broke today as well.

jredding@drupal.org’s picture

yup.. my sites are down too.

liorkesos’s picture

Hi,
Could this be a 4.7.x thing?
2 sites I have are down and both run 4.7.x based gmap mashups.
A friend has a 5.x site which seems to be working fine?
Can anyone confirm? 5.x sites working well?
Does anybody know what api versions each use?
Lior

jredding’s picture

Good catch..

My 5.1 sites are up and running. the 4.7 sites are down for the count.

liorkesos’s picture

Ok,
I found a temporary workaround inspired by the help of bdragon...
It appears google is doing something funky reading the api ver and acting accordingly.
I don't understnad it totally but if you change line 31 in gmap/gmap.module from

define('GMAP_API_V', '2.55a');

to

define('GMAP_API_V', '2');

Things get normal again - I guess they have some conditionals on the version of the api - maybe a >= 2.x something and maybe supplying a generic 2 version we live within the condition.
Hope this helps..
Bdragon if this persists would you consider committing this formally to enable 4.7 gmap usage?
thanks for your help today
Lior

jredding’s picture

You already know.. but its confirmed to work.

Thank you for the workaround!

z.stolar’s picture

Maybe we don't need to go that far backwards. Have you tried other versions?
Look here for a complete changelog of google maps API: http://mapki.com/wiki/Changelog

Can API version number be modifiable via settings? This would speed up debugging.

bdragon’s picture

Sorry, the API version can't be modified with settings. The 5.x version is currently using "2" (I changed it yesterday because I needed to pick up some new features that were added since the last time I bumped the version)

I am a little reluctant to do the same for the 4.7 version, but if things either fix themselves, or there's a later version that doesn't break anything, I'll apply it to DRUPAL-4-7--2.

I can't test Drupal 4.7 stuff myself, but I'll apply anything you guys need that's sane and has been tested, within reason... I _really_ don't want to have to debug the 4.7 version, it's very different than the 5.x version.

liorkesos’s picture

Testing/Production environment.
We (Linnovate) have two environments running 4.7 mashups and we can try the commits on our environments.
If you plan commiting we can test it before..
best regards
Lior

afagioli’s picture

I do confirm the
(#6 submitted by liorkesos on May 24, 2007 - 19:54) has solved my issue

thanks a lot!

pbarnett’s picture

Yup; the workaround fixed all my 4.7 sites too.

Thanks, guys!

eferraiuolo’s picture

Had the same problem, interesting to see all of us found it today! :)
Did what Update #6 (liorkesos) suggested, and maps are back and working like normal!

Nice find and quick fix liorkesos!

nipaed’s picture

i confirm both symptoms and workaround (thanls a lot for it :) for 4.7 gmap module

jpsalter’s picture

Ditto for me - this version changed fixed my 4.7 sites.

jpsalter’s picture

I spoke too soon. The version change worked for one page load - then upon the second page load I get this js error:

uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMViewCSS.getComputedStyle]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: http://www.google.com/mapfiles/78/maps2.api/main.js :: mb :: line 36" data: no]

Any ideas?

ahoeben’s picture

fix works as advertised, thanks

ryanlath’s picture

This fixed the maps showing up, but to get my lines to work, I had to use version '2.69'. Hope that helps anyone having similar problems.

jpsalter’s picture

Both version settings work for me (v2 and v2.69).

But, nothing works when I have the thickbox module installed. This gives the error:

[Break on this error] undefined style.css (line 772) uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMViewCSS.getComputedStyle]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: http://www.google.com/mapfiles/69/maps2.api/main.js :: gb :: line 36" data: no]

It took a while to sort this out because I installed thickbox.module at the same time that v2.55a stopped working. I hope no one else has this problem. Now - to sort out the thickbox problem - I'll post my issue there.

tom_o_t’s picture

My maps have stopped working again - same javascript error with GLatLngBounds is undefined... - seems to have just happened, midday East Coast time.

tom_o_t’s picture

To get my maps working again I had to do a messy hack - commenting out the line:

// var bounds = new GLatLngBounds();

Somewhere around line 153

The bounds variable is used for autozoom, so this will probably stop working if you use it. It also seems to be used with clusterer, but I've never managed to get clusterer working anyway, so I don't mind about that! I used this in combination with fix #6 above, to prevent the javascript errors about GIcon and _mFlags being undefined.

I hope someone with better bugfixing abilities can figure out what exactly's going on here...

benma’s picture

subscribing

ajwwong’s picture

I can confirm 2.69 as working. Thanks everyone... you're great!

tom_o_t’s picture

Yeah, 2.69 working with me too - ignore my last entry - that was with V2.

eferraiuolo’s picture

version 2.69 is also working for me. I think this is ready for a patch to be submitted.

janv@www.drupalsites.net’s picture

Version 2.69 works for me as well.

marius.s’s picture

Priority: Critical » Minor

That's what helped me get the gmap working again:
1. Changing the version to 2.69.
2. Disabling thickbox module.
3. Resubmitting the map again.

bdragon’s picture

OK, changed map version to 2.69 on DRUPAL-4-7--2 and DRUPAL-4-7 (as it's a one liner and everyone's 4.7 sites are broken due to this...)

mndonx’s picture

I guess I'm in the minority - tried 2 and 2.69 and neither cleared the _mFlags or the GLatLngBounds errors. Any ideas?

bdragon’s picture

Status: Active » Closed (fixed)