Page in question is http://da.alliantpower.com/store-locator

With browser location on, sometimes the stores do not update when you first load the page.
The map updates, with all the right pins, but the left panel with store info keeps the default data from Nebraska.

Pressing enter in the "Where are you?" filter reloads the map and populates the left side properly, but the initial load sometimes fails.

I've had it happen in Chrome 41, Firefox 36, and IE 11, with IE being the worst offender.

In Chrome, I could ONLY get it to happen with cache disabled or when first loading the site, but sometimes, it works anyway.
In Firefox, it happens more often with cache disabled, but sometimes happens anyway.
In IE, it basically happens all the time.

It happens whether I aggregate JS code or not.
It happens whether I'm logged in or not.
Happens with anonymous caching both on or off.

That's why I think it's a race condition. One of the JS functions is firing before another function it depends on.

I hope someone more familiar with the module can point me in the right direction here.

Thanks

Comments

Oulalahakabu’s picture

Hi, you are probably using MarkerClusterer

google_store_locator.js, l41 :

    if ((markerClusterEnabled && switchToMarkerCluster && !$.isEmptyObject(Drupal.GSL.currentCluster)) || (viewportEnabled && viewportNoMarkers)) {

to

if (viewportEnabled && viewportNoMarkers) {

Seems to solve the problem badly.
Same problem at this moment and no time to investigate more on this, i'll mybe have a look another day.