GMap style views: missing tooltip

mrb@drupal.org - January 26, 2009 - 15:33
Project:GMap Module
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:needs review
Issue tags:gmap, tooltip, views
Description

In the D5 version, if you hold your mouse over a marker on a GMap view, you get a tooltip showing the related node's title. In the D6 version, there is no tooltip.

After making the patch to gmap_plugin_style_gmap.inc from http://drupal.org/node/352553, I also added these lines

// Set marker's title so that it will be displayed as tooltip for this marker
$node = node_load($row->nid);
$marker['opts']['title'] = $node->title;  

above this line from the linked patch

if ($defaults['markermode'] == 1) { // popup

Hopefully someone with more views experience can point out an easier way to get the row/node's title if it's already available to the code.

#1

rootwork - January 26, 2009 - 17:32

Awesome! I rolled a new patch with these changes included over at #352553: Gmap styled views ignore "Marker action" setting to keep things all in one place.

#2

artatac - July 21, 2009 - 15:35

Will this be rolled into the dev release if not could I request a copy of the gmap_plugin_style_gmap.inc file

#3

dougzilla - August 7, 2009 - 19:54

I too really miss this functionality in the d6 version.

#4

srobert72 - August 11, 2009 - 13:07

Subscribing

My modules :
gmap 6.x-1.x-dev
views 6.x-2.x-dev

In this system page, when rollover on marker, tooltip appear
http://www.mydrupal.com/map/node

But not in my own Views with GMap style.
When I click on markers, my popup with clickable fields appears.
But when I rollover on markers, tooltips don't appear.

#5

chezwel - August 13, 2009 - 00:58

having the same problem with gmap views. A solution to this will be very helpful.

#6

dougzilla - August 13, 2009 - 16:27

Interestingly enough, when using Martin Pearman's ClusterMarker, the tool tips work for the pin representing the cluster.

#7

srobert72 - August 13, 2009 - 18:00

Yes I've just tested it with last version 1.3.2 downloaded here :
http://googlemapsapi.martinpearman.co.uk/downloads.php?cat_id=1

Tooltip for cluster pin appears.
But no tooltip for nodes pins.

In my opinion that confirms that Gmap and JavaScript aren't in fault.
The problem must be in Drupal Gmap Views that don't export required text for tooltip.

Is there a chance to see it resolved ?

Thx a lot for your help.

#8

izmeez - August 29, 2009 - 23:19

subscribe

#9

srobert72 - September 3, 2009 - 13:27
Version:6.x-1.0» 6.x-1.x-dev
Status:active» needs review

Here is a patch for tooltip in GMap Views.

GMap views expose new parameter "Tooltip field".
You can specify which field will be used to write text tooltip. So it could be other one than Node:Title.

Thx if you could make reviews and hope it could be commited.

AttachmentSize
gmap_364413-9.patch 2.63 KB

#10

ArthurC - October 9, 2009 - 00:31

@srobert72: exactly what I was looking for. So I implemented the changes in my code, and ... unfortunately, nothing has changed. No tooltip. No "Tooltip field:" in GMap views.

I'm using gmap-6.x-1.1-rc1, for which the download is dated 2009-Mar-04.

This is the top line in the file I changed:
// $Id: gmap_plugin_style_gmap.inc,v 1.7 2009/02/05 21:51:53 bdragon Exp $

Is there something I missed that you didn't state here, perhaps because you thought it was obvious? Do other files need changing?

Any help would be greatly appreciated. Thanks.

#11

srobert72 - October 10, 2009 - 05:08

@ArthurC : You need to apply all changes in patch file
See http://drupal.org/patch/apply

#12

ArthurC - October 11, 2009 - 18:53

I definitely did apply all the changes in the patch file, but no tooltip popped up with my map markers, and no "Tooltip field" parameter appeared in GMap views.

So I am wondering what are the complete set of changes or patches that I need to make.

Reading through this thread, it appears that I may need to apply srobert72's patch #9, AND mrb's patch #8 from http://drupal.org/node/352553.

Patch #8 in 353553 is, if I understand correctly, the merged patch of the changes originally provided at the top of 352553 and at the top of this thread, http://drupal.org/node/364413.

However, I looked at the patch from drupal.org/node/352553, and I think that bdragon changed gmap_plugin_style_gmap.inc after 352553 was written. In its current version 1.7, dated 2009/02/05, gmap_plugin_style_gmap.inc appears to include some of the changes from the 352553 patch.

The authors of the code - bdragon, mdb, and srobert - are certainly in a better position than I am to advise on the correct way to proceed.

Thank-you, all.

#13

ChrisRut - October 28, 2009 - 21:43

:subscribe:

#14

robbertnl - November 3, 2009 - 12:23

Subscribing

#15

learndotnet - November 4, 2009 - 12:57

Subscribing

#16

danieldd - November 17, 2009 - 14:13

Subscribing.
I have also tried to apply the changes in #9 on 6.x-1.1-rc1 but did not seem to do anything. Perhaps I have not understood all the changes required, or the version to be modified etc as per comment #12.

#17

srobert72 - November 17, 2009 - 15:00

Here are 2 screenshots to explain what patch #9 should provide.

It works only with Views which have "GMap" style (see GmapViews.gif).
In "GMap" style options you have a new field "Tooltip field" (see GmapViewsOptions.gif).
You can fill it with one of your fields available in your view.

Could you confirm me if it works like this or not ?

AttachmentSize
GmapViews.gif 30.89 KB
GmapViewsOptions.gif 14.23 KB

#18

danieldd - November 17, 2009 - 16:41

Hi, thanks for responding and for the patch. I can confirm that I did try this with GMap style Veiws.

I did not see the new "Tooltip field" as per the attached image. However, I chose "Location.Module" as my data source, rather than "choose longitude and latitude fields". Would this explain why the option was not visible and, if so, do you know how to adapt the patch to this option?

In addition I see that your form contains other options - "center on node argument" & "highlight marker for node argument" that are not present in my version. Are these options the result of other patches applied to Gmap, or of using a version other than 6.x-1.1-rc1?

Thanks again

#19

srobert72 - November 17, 2009 - 18:09

#20

danieldd - November 17, 2009 - 19:22

Thanks - do you think it is neccessary to apply these to get #9 to work, and have you made any other modifications that may be needed? Did you begin with 6.x-1.1-rc1?
These all look like great extensions to the module, hope you can get them committed.

#21

ressa - December 3, 2009 - 21:35

Thanks for the patch Stéphane, I hope it makes it into the next release.
Mouseover and tooltips are much needed for the Gmap module.

#22

srobert72 - December 5, 2009 - 12:03

Sorry all for my late reply.

In fact I've just apply and test my patch (see #9) on GMap 6.x-1.x-dev (2009-Jun-09).
I don't know if it works or not on GMap 6.x-1.1-rc1.

Nevertheless this patch works on its own and you don't have to install my other ones.
Each of my patches work independently and can also be installed together to have all the features applied.

 
 

Drupal is a registered trademark of Dries Buytaert.