The default-marker handling for the gmap views style plugin is buggy (error in gmap_plugin_style_gmap.inc):
A location's marker icon is *not* set (!) to the default marker icon (in case the location has no marker set according to the style settings), but to the last marker icon which has been used on the last outputted location before. Completely erronious behaviour regarding markes is the result, a simple omission of setting back the $markername to the default marker in each loop cylce the cause, and the solution very simple and already included in the attached patch. Please review and commit.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

danielnolde’s picture

patch file attached

Breakerandi’s picture

really cool!!
With this i can make a gmap with nodes and users in one map based just on locations and the markers are based on nodes and fallback on default marker for the users :-)

amelfe’s picture

Version: 6.x-1.1-rc1 » 6.x-1.x-dev

+1
passing it to dev version. It's still a problem there too.

The second part of the patch is also solving the case where we have multiple markers per view result : when a result doesn't have a marker, the one of the result before is affected to it.

podarok’s picture

Version: 6.x-1.x-dev » 7.x-2.x-dev
Status: Needs review » Needs work

please, provide patch against latest dev

socialform’s picture

Issue summary: View changes

I have 6.x-2.0-beta5 installed and have the same bug. It has been some years since the last post... surprised this hasn't been an issue for more. Has anyone a patch for 6 to share? thank you

For views using a marker field handling... the "Marker / fallback marker to use" in views settings isn't respected. Nodes that leave that field empty are rendered with the same pin as the last node saved.

same as comment #56 in https://drupal.org/comment/7406976#comment-7406976

l0ke’s picture

The issue history starts from #549086: Markers not reset but then marker reset was moved to the loop on $sets, while it has one more loop inside on $records, and that is the place where $markername should be reset.

Status: Needs review » Needs work

The last submitted patch, 6: gmap-marker-not-reset-566660-6.patch, failed testing.