I'm using Views 3 to display nodes on a gmap. I'm trying to use a custom field created with the Field module to set the markername property. So in the View's Gmap Settings, I have the Marker Handling set to "Use marker field". Then Marker Field set to "Content: Custom_Field".

With those settings, the markername gets set to the node id. As a result, I get the javascript pop-up: "Request for invalid marker set 71!". 71 is the node id of the node that was supposed to get plotted on the gmap.

If I use a native node field like the "Title", then markername gets set properly.

Comments

diffstrat’s picture

Any progress on this bug? Do you need any more info from me?

brunogoossens’s picture

related to http://drupal.org/node/1326176

I'll make a patch for it.

brunogoossens’s picture

StatusFileSize
new1.03 KB

Patched!

brunogoossens’s picture

Status: Active » Needs review
diffstrat’s picture

@ brunogoossens Thanks for the patch. It's working for me. I sure appreciate it.

podarok’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev
git apply --check gmap_fix_for_field_marker.patch
fatal: corrupt patch at line 26

#3 needs reroll against latest head

podarok’s picture

Status: Needs review » Needs work

status

marco.abiuso.questar’s picture

Don't know if this is the case, but as in http://drupal.org/node/1153032, someone is using 'field_' . $marker_field_obj->field to search for the chosen field, instead of using $marker_field_obj->field_alias;

In Views 3.5 this does not work at all: the field result empty.

So change

~129
    // Determine fieldname for marker field.
    if ($this->options['markers'] == 'field') {
      $marker_field_obj = $this->view->display_handler->get_handler('field', $this->options['markerfield']);
-      $marker_field = 'field_' . $marker_field_obj->field;
+    $marker_field = $marker_field_obj->field_alias;
    }

and

~256
if (!empty($row->{$marker_field})) {
-              $markername = $row->{$marker_field}[0]['raw']['value'];
+              $markername = $row->{$marker_field};
}

With those changes I am now able to choose the markername field in my view.

podarok’s picture

#8 - can You provide a patch against dev for testing?

zviryatko’s picture

Assigned: Unassigned » zviryatko
Issue summary: View changes
zviryatko’s picture

patch that provide ability to select image field as marker icon in views gmap style.

sanchiz’s picture

Status: Needs work » Needs review

bot status

The last submitted patch, 3: gmap_fix_for_field_marker.patch, failed testing.

podarok’s picture

Status: Needs review » Fixed

#11 commited
Thanks!

  • podarok committed c3ea887 on 7.x-2.x authored by zviryatko
    Issue #1580330 by zviryatko, brunogoossens | diffstrat: Fixed Using...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.