google_store_locator.js throws the following error when Internet Explorer 8 users attempt to access the store locator page:

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET4.0C; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
Timestamp: Fri, 28 Sep 2012 22:44:10 UTC


Message: 'geometry.coordinates' is null or not an object
Line: 77
Char: 7
Code: 0
URI: http://www.example.com/sites/all/modules/google_store_locator/js/google_store_locator.js?mb2zif

It would seem that Internet Explorer 8 doesn't like this bit:

// build all our stores                                                                                                                                                                                                                                                   
    for (var i in json.features) {

I was able to work around this by utilizing the jQuery.each() function in place of the for loop. I've attached a diff file detailing the changes I made. This has worked in every browser I've tested with, but I'm admittedly no programmer, so there may be better methods of resolving this.

CommentFileSizeAuthor
google_store_locator.js_.diff864 byteschenry
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

michfuer’s picture

Hi chenry,

Using a Windows 7 install on VirtualBox with IE8, I had no problems seeing the canvas and panel with store location content, and without. The error message you posted occurs when we try to set the latitude and longitude coordinates for a single store. These values are retrieved from the 'Location Export' view which by default is located at 'your-site-name/store-locator/json'.

Make sure you have the geocoder module (http://drupal.org/project/geocoder) enabled because that will be converting the street addresses into latitude and longitude coordinates.

AngryWookie’s picture

Status: Active » Postponed (maintainer needs more info)
chenry’s picture

Strange. I tried IE 8 on Windows 7 and got the same error as I did using IE 8 on XP.

Here's my JSON: https://www.abtexas.com/store-locator/json

This will bomb out in IE 8 without the modifications I detailed in my original post.

Final product is here: https://www.abtexas.com/locations

Anyway, it's obviously not critical if you're not able to replicate the issue, and if nobody else is reporting it. I'm happily using my work-around for now, but still puzzled by what's causing the underlying issue on my site.

Thanks again for all your work on this awesome module!

AngryWookie’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

In the interest of keeping the issue queue clean and because you have a work around in place I'm going to mark this as closed and will revisit the issue if we get further reports or are able to reproduce.

kpander’s picture

I'm just chiming in here to say that I've had the same problem occur for me, but inconsistently. With 3 different installs of the same version of IE8 in 3 different clean Windows XP installations, I see the same error you noted in 2 of them.

I haven't been able to isolate any variable that points to why it works in one but not the other 2, but I am using the patch you provided and that's working for me. (Thanks!)