The $tooltip_field solution from #679804-40: Patch for 4 new features in GMap does not do what (I think) it's supposed to do. It uses the raw field data from the database, instead of the rendered field with all rewrite options applied.

In gmap_plugin_style_gmap.inc it says

<?php
+      $tooltip_field_obj = $this->view->display_handler->get_handler('field', $this->options['tooltipfield']);
+      $tooltip_field = $tooltip_field_obj->field_alias;
...
+            $tooltip = $row->$tooltip_field;
?>

Correct would be:

<?php
      $tooltip_field = $this->options['tooltipfield'];
...
            $tooltip = $this->rendered_fields[$row_index][$tooltip_field];
?>

(with a few sanity checks here and there)

-----

The same can be said for the $marker_field, but with a strip_tags(), as marker names don't contain html.
Otherwise, marker fields defined with views_customfield will not work.

----

There is still one problem with the tooltip field:
It can happen that I want to use html in the field for the clusterer output (Jef Poskanzer's Clusterer, in my case). Such as, the link tags from "output this field as a link".
However, in a html title attribute this will show up as explicit html tags - not nice.

The ideal solution would be to treat the field for the clusterer independently from the title attribute.

----

Not sure if this is a bug report or feature request.
I didn't check the latest -dev, and I didn't check D7.

Comments

itaye’s picture

What exactly do I need to change in the file?

I am using: Gmap module 6.x-1.1

izmeez’s picture

subscribe

donquixote’s picture

Any chance of getting this in?
(yes i know, i should produce a patch..)

Summit’s picture

subscribing, greetings, Martijn

johnv’s picture

Status: Active » Closed (duplicate)

Since, there is not much activity, let's continue at the D7-version of this issue, and backport later on.
#1326176: Tooltip displays the NID if tooltip field is an entity translatable field