When I choose a different markerstyle in views, all my markers on the map disappear.

Javascript gives the following error:
TypeError: this.gicons[setname] is undefined in the function Drupal.gmap.getShadow.

When I change the function from
if (this.gshadows) return this.gshadows[setname][sequence % this.gicons[setname].length];
to
if (this.gshadows && this.gicons[setname]) return this.gshadows[setname][sequence % this.gicons[setname].length];
it starts working again.

CommentFileSizeAuthor
#9 gmaps-disappearing-markers-1952940-9.patch459 bytesjelle_s
#7 gmaps-disappearing-markers-9047009.patch583 bytesAnonymous (not verified)

Comments

podarok’s picture

Version: 7.x-2.5-alpha4 » 7.x-2.x-dev
Status: Active » Postponed (maintainer needs more info)

Can You provide a patch against latest dev?

demoshane’s picture

This happens also on 2.8. Map stays grey. The odd thing is that we have this block on domain setup. The code is shared and this works on 9 out of 10 domain. Only domain that is server from subdomain url gives this error. We have also exposed taxonomy filter on the map. Map is grey until you choose a taxonomy, then it refreshes and works all of the sudden. (Views is using AJAX)

demoshane’s picture

Version: 7.x-2.x-dev » 7.x-2.8
Issue summary: View changes

Updating the version number. This happens also on 2.8.

demoshane’s picture

Patch doesn't work on 2.8 in our setup.

earthangelconsulting’s picture

Well, I don't know why it didn't work for @Demoshane but this patch works even when applied against the icon.js file in 6.x-2.0-beta5+1-dev

and I bet it works on 7.x-2.x at least in some cases

this patch (or something like it) really needs finishing off and incorporating into the latest dev release of Gmap 7.x-2.x because without it, the new version of Jef Poskanzer's Clusterer2, updated for Google Maps V3 (see https://www.drupal.org/node/1968416 ) doesn't work, no markers are displayed!

earthangelconsulting’s picture

for some related material re: getting Clusterer2 working under GMaps Version 3 API... see https://www.drupal.org/node/2175929#comment-9047009

Anonymous’s picture

StatusFileSize
new583 bytes

Patch against the latest dev

jelle_s’s picture

Still having this problem in 2.11

jelle_s’s picture

Status: Postponed (maintainer needs more info) » Needs review
StatusFileSize
new459 bytes

Patch for latest dev.

Status: Needs review » Needs work

The last submitted patch, 9: gmaps-disappearing-markers-1952940-9.patch, failed testing.

jelle_s’s picture

test fails seem unrelated to this patch.