Hi all,
I rewrote a new patch for 4 old issues :
#334846: Center Gmap on Node passed as argument in view
#364413: GMap style views: missing tooltip
#568724: Add Google Bar to search on map
#568976: Highlight marker on mouse rollover event
For each issue i've posted a patch. But some are incompatible with last DEV version.
So I reposted a new patch including those 4 old patches together.
It is compatible with last DEV version : 6.x-1.x-dev (2009-Dec-16 )
Application procedures :
* copy patch file in GMap module directory (/drupal/sites/all/modules/gmap)
* cd /drupal/sites/all/modules/gmap
* patch < gmap_4features.patch
I have problem with new JS file "highlight.js" that isn't created in gmap/js directory but in GMap module root directory
I you have salme problem just move it :
* mv highlight.js js/
I post here patch file
gmap_4features.patch.
I also post <code>highlight.js
file alone, if you need it. Just change extension TXT in JS.
Comment | File | Size | Author |
---|---|---|---|
#59 | d6-gmap-center-on-node-arg-any-arbitrary-node.patch | 1.52 KB | branana |
#40 | gmap-679804-40.patch | 17.87 KB | rooby |
#31 | gmap-679804-8.patch | 10.55 KB | bendiy |
#27 | s1.png | 53.88 KB | Anonymous (not verified) |
#27 | s2.png | 57.76 KB | Anonymous (not verified) |
Comments
Comment #1
srobert72 CreditAttribution: srobert72 commentedSorry for bad formatting. I wanted to write :
I post here patch file
gmap_4features.patch
.I also post
highlight.js
file alone, if you need it. Just change extension TXT in JS.Comment #2
izmeez CreditAttribution: izmeez commentedsubscribing
Comment #3
ahkiam CreditAttribution: ahkiam commentedsubscribe
Comment #4
bdragon CreditAttribution: bdragon commentedUnified diff format, please. (diff -up)
It makes it much less likely to break.
Comment #5
g.k CreditAttribution: g.k commentedAre these patches included in latest dev release 6.x-1.x-dev (2010-Jan-09)?
Thanks,
Comment #6
srobert72 CreditAttribution: srobert72 commented@bdragon:
Here is patch file in Unified diff format.
I regenerated it after CVS update 6.x-1.x-dev (2010-Jan-10). So it is compatible with last DEV release.
@gkap:
No it isn't included in DEV release you must patch it for the moment.
Comment #7
falkendk CreditAttribution: falkendk commentedIm maybe asking dum but how do i use highlight (and center the gmap)
I think i have applied the patch but can't see any changes, i cant see any highlight on my makers.
Comment #8
srobert72 CreditAttribution: srobert72 commentedHighlight appears on rollover mouse event.
To test you must place your mouse on marker same as to show tooltip.
Comment #9
srobert72 CreditAttribution: srobert72 commentedI post you some screen captures to explain changes you should see.
Capture 1
/admin/settings/gmap
See 4features-gmap_1.PNG
Capture 2 and 3 while editing your Views.
See 4features-gmap_2.PNG
* you must add Global:null argument
* when editing GMap style you should see new options
See 4features-gmap_3.PNG
* choose which field to use for tooltip
* activate centre map on node ID passed as argument if you want
Comment #10
jdlind38 CreditAttribution: jdlind38 commentedsubscribing
Comment #11
falkendk CreditAttribution: falkendk commented@srobert72 Thank you very much! :)
But the Center on node argument and Highlight marker for node argument don't appear under Gmap's settings in views
Comment #12
falkendk CreditAttribution: falkendk commentedI found out :) had to add -p0
patch -p0 < gmap_4features-up.patch
Thank you so much!!!
Comment #13
ayalon CreditAttribution: ayalon commentedgood patch thanks a lot!
Comment #14
Sinan Erdem CreditAttribution: Sinan Erdem commentedVery nice options indeed.
Just one thing: Is it possible to put more than one field to the tooltip area? It would be really nice...
Comment #15
Anonymous (not verified) CreditAttribution: Anonymous commentedI tried to run the patch against the latest dev version of gmap and got the errors below. Could it be that some of these patches have already been commited?
(Stripping trailing CRs from patch.)
patching file gmap.module
Hunk #1 FAILED at 119.
Hunk #3 FAILED at 292.
2 out of 3 hunks FAILED -- saving rejects to file gmap.module.rej
(Stripping trailing CRs from patch.)
patching file gmap_plugin_style_gmap.inc
(Stripping trailing CRs from patch.)
patching file js/marker.js
(Stripping trailing CRs from patch.)
patching file js/gmap.js
(Stripping trailing CRs from patch.)
patching file js/highlight.js
Comment #16
Anonymous (not verified) CreditAttribution: Anonymous commentedI applied the patch (but with the errors mentioned above) but I am not getting any tooltips.
I am using:
- Views 2.8
- latest dev gmap
- latest dev location
Comment #17
Sinan Erdem CreditAttribution: Sinan Erdem commentedI also get some errors trying to patch the latest version, so I made the necessary changes by hand with the code differences from the patch. So now, I have tooltips displaying...
Comment #18
Anonymous (not verified) CreditAttribution: Anonymous commentedWhich changes did you make, specifically:
1- What version of the gmap module are you using, dev?
2- Which files did you edit/fix?
3- Which part of the patch for those files did you apply?
Comment #19
srobert72 CreditAttribution: srobert72 commentedOK I'll see to update patch to last DEV version.
But you know first release of these 4 patches is 5 month old.
And they have never been commited in CVS.
So each new DEV release I must update them.
It doesn't encourage to participate in development.
Comment #20
Anonymous (not verified) CreditAttribution: Anonymous commentedI *totally* agree. I just wanted to point it out for future readers so they know what to expect.
Luckily patch will try it's best to apply what's missing and not what's already committed.
That being said ... I ran patch, and I think it did the right thing, but still no tooltip for me. So maybe patch didn't quite get it right ... or maybe the bug has come back somehow.
BTW any idea why this is not being committed to CVS and the latest dev release. Who do we need to ping to get this committed?
Comment #21
srobert72 CreditAttribution: srobert72 commentedNo file from this patch has been commited.
Like etcetera9 in #17 you can open patch file in text editor and update manually your gmap module.
I think last DEV release update same block of code and now my patch is in conflict.
But I wrote few lines of code and I think I could be simple to resolve conflict manually.
Comment #22
Sinan Erdem CreditAttribution: Sinan Erdem commentedIt totally works as expected for me. I am using 6.x-1.x-dev (2010-Jan-10). Tooltips work for me.
So I am marking this as reviewed & tested by the community if no one objects...
Comment #23
srobert72 CreditAttribution: srobert72 commentedYes patch is compatible with 6.x-1.x-dev (2010-Jan-10).
I haven't test it on 6.x-1.x-dev (2010-Jan-24).
To apply patch try KasperChristensen's procedure in #12
patch -p0 < gmap_4features-up.patch
Comment #24
Anonymous (not verified) CreditAttribution: Anonymous commentedI did the code change by hand and can confirm that everything works.
Thanks!
Comment #25
hutch CreditAttribution: hutch commentedHere is a patch on Jan 24 dev version. Used unix diff to build it.
rename highlight.js_.txt to highlight.js and put in js directory
Please test
Hope this helps
Comment #26
hutch CreditAttribution: hutch commentedoops forgot gmap_plugin_style_gmap.inc
Use this one instead of gmap_4features-up2.patch
Comment #27
Anonymous (not verified) CreditAttribution: Anonymous commentedJust a note to anyone trying to get this to work with a CCK location field, it won't. The data needed must be pulled from a Location (not a CCK location) so you need to make sure you include a Location.latitude and a Location.longitude field in your field selection (see s1.png).
You must also assign these the Location relationship.
Then in the GMap settings, you set the latitude and longitude to come from those two fields (see s2.png)
Comment #28
mrgoltra CreditAttribution: mrgoltra commented+1
Comment #29
bohz CreditAttribution: bohz commented#25 working as expected against latest dev (jan 24).
Thanks!
[edit: noticed that if you set the autozoom feature in gmap settings AND center the map on node argument in your view with single marker, the argument Global:null returns all the nids therefore printing all the markers you have available according to view settings. adding Node:nid argument restores the printing of the single marker relative to the nid you're viewing.
please note: I am not sure if this is the cause b/c I have added several - unrelated - modules and upgraded to 6.16 in the meantime ]
Comment #30
GiorgosKtooltip works as expected
did not have a need for the rest of the features so I did not test them
Comment #31
bendiy CreditAttribution: bendiy commentedIs this module abandoned?
I've rerolled this patch for the latest dev version as of March 24 2010.
It includes the new "highlight.js" in the patch.
Enjoy!
Comment #32
srobert72 CreditAttribution: srobert72 commented@bendiy #31:
See my comment #19 and historic of this 4 patches:
#334846: Center Gmap on Node passed as argument in view
#364413: GMap style views: missing tooltip
#568724: Add Google Bar to search on map
#568976: Highlight marker on mouse rollover event
I started to write them in Sept 2009. I delivered patch with Unified diff format as requested.
But they still are not commited, no more in DEV version !
So I abandonned to deliver patch for this module due to lack of reactivity.
To acquire all features I need, I've just changed map module.
Now I use GMaps : http://drupal.org/project/gmaps
High reactivity and many many more features.
Comment #33
Sinan Erdem CreditAttribution: Sinan Erdem commentedI must say that I agree with srobert72.
In my opinion, the maintainer of the GMaps module, xmarket, is the new "MerlinofChaos" :))
Comment #34
bendiy CreditAttribution: bendiy commentedThanks for the feedback.
I actually just installed Gmap yesterday for the first time to do some mapping that I needed. I have been debating as to which module to use Gmap or Gmaps. I picked Gmap because it's been around for years and has over 17,000 downloads. Gmaps is pretty new and only sports a few hundred. However, I was afraid when I saw that Gmap hasn't had a official release since December 2008.
Since I'm just starting with mapping in Drupal, I'll be sure to give Gmaps a spin and see how it fits.
The new "MerlinofChaos"... is that possible?
Comment #35
izmeez CreditAttribution: izmeez commented@srobert72
Wow, until I read #32, I did not even realize there were two different modules "/project/gmap" and "/project/gmaps". This could be very confusing for the Drupal community. Now, I too will have to decide which to choose.
Thanks for the heads up,
Izzy
Comment #36
AdrianB CreditAttribution: AdrianB commentedI second #35, thanks to this issue I found the other Google Maps module. I was worried by the lack of releases of this one, so I'll start with the other one instead.
Comment #37
mrgoltra CreditAttribution: mrgoltra commentedI started to use Google Maps and it looks very promising. A few issues with the cck field but once that is fixed.
Comment #38
rooby CreditAttribution: rooby commentedThanks for the patch, they are useful additions.
Marked these issues as duplicates of this issue:
#334846: Center Gmap on Node passed as argument in view
#364413: GMap style views: missing tooltip
#568724: Add Google Bar to search on map
#568976: Highlight marker on mouse rollover event
I have tested the tooltips, highlight on hover and google toolbar parts of the patch and made a few amendments.
I still have to test the centre on argument part but I don't have time right now. I'll get back to it in the next day or two.
When I commit it I will give a list of my amendments too.
Comment #39
izmeez CreditAttribution: izmeez commented@rooby Looking forward to the commit.
I wonder if anyone has done a comparison of the two modules http://drupal.org/project/gmap and http://drupal.org/project/gmaps ?
Thanks,
Izzy
Comment #40
rooby CreditAttribution: rooby commentedCommitted to D6.
Here is a patch with the changes that were committed.
I will commit the changes to D7 at some stage too.
The changes I made were:
* A little css fix to make the google toolbar display correctly.
* Changed mouseover highlight so that it un-highlights on mouseout. This is how I would expect it to work. If anyone has major objections let me know.
* Added a colour option to the gmap settings page for the highlight marker on mouseover behaviour.
* Changed tooltip option so that it doesn't depend on datasource option.
* Made the highlight marker for node argument work.
* Added a colour option for the highlight marker for node argument option.
* Changed the settings for the center on & highlight on node argument options so that you can select an argument to use based on the views arguments. This means you can use different arguments for each option and use any argument that contains a node id.
* A couple of bug fixes
* A couple of coding standard fixes
Comment #41
Boletus CreditAttribution: Boletus commentedIs this patch applied to the 6.x-1.x-dev version? I can't run patch.
Comment #42
rooby CreditAttribution: rooby commentedYes. The patch in #40 is what was committed.
You don't need to apply anything if you are using the most recent dev.
I posted it for the original patcher's to see what changes I made to their patch.
Comment #43
izmeez CreditAttribution: izmeez commentedThanks, dev version seems to be working fine.
Comment #44
Boletus CreditAttribution: Boletus commentedThanks! Will give it a go! :)
Comment #45
Boletus CreditAttribution: Boletus commentedSeems to work ok. But in maps created in views, the highlights are activated at all times. In GMaps created with the gmaps module the are hoverable.
Another thing, how do I make markers link to nodes in GMaps created in views instead of showing a bubble?
Comment #46
izmeez CreditAttribution: izmeez commented@boletus, re: #45 - I am not having the problem you are. I have gmap in views and the highlights are only showing on hover. I am using gmap and location cck. I am confused by your line "in Gmaps created with the gmaps module" - are you comparing the behaviour in the Gmap and Gmaps module? or are you creating the maps through another content type?
Thanks,
Izzy
Comment #47
Boletus CreditAttribution: Boletus commentedHm ... I use the two default maps from the Location module, GMap Location, User Location and Node Location to show a map over nodes and users. In this maps, the profile Location map, there is no semi-highlights shown before I hover the cursor over the marker.
But in Views Gmap display type, the color (a.e. green) I set in the Views Gmap highlight setting, is snow as semi-transparent prior to hovering, and the highlight color setting I have entered in the GMap setting (a.e. red) in Site Configuration, is overlayed the green.
I can send you the URL:s if you are interested in a PM. The site is not online yet. Thanks for answering! :)
Comment #48
izmeez CreditAttribution: izmeez commentedI am just a user of the module, not the module maintainer and I am just exploring some of this myself.
In my Views Style Gmap I only saw the item "Highlight marker for node argument" and left that unchecked. I did not see anything else that had to do with highlight on hover. In the Gmap settings I checked the highlight on rollover. I also didn't like the green color so I entered #FF0000 for the highlight color. So I assume that highlight on mouseover is a site wide setting not one you can apply to specific views only, unless there's an option I am not seeing.
Izzy
Comment #49
rooby CreditAttribution: rooby commented@Boletus:
There are two new highlighting options.
There is the highlight marker on rollover setting on the gmap settings page, which enables on all gmaps highlighting when the mouse hovers over a marker.
The second option is the gmap views option Highlight marker for node argument, which allows you to select one of your view's arguments. If this argument is a number that matches a node ID of a node in your view's results then all markers for that node are highlighted.
If you are using both those options and you hover over one of the already highlighted markers the highlight colours will merge into a different colour.
You say in your view your markers are already highlighted.
If the highlighted markers are not related to the argument you selected to use for highlight or you have not selected an argument or something then there is possibly a bug.
If you are seeing strange behaviour can you post en export of your view in a txt file or something? It will be easier to see what is going on.
This question is not related to this issue.
Please open a new issue for new questions/bugs (if someone hasn't already posted the same issue), otherwise it is too hard to follow.
Comment #51
rooby CreditAttribution: rooby commentedI have committed this to HEAD also.
Comment #52
rares CreditAttribution: rares commentedI also have the issue described by boletus in #45.
The problem has been reported as issue #769652: 'Highlight marker for node argument' unchecked, highlight still visible., and has a patch submitted too.
Comment #53
heacu CreditAttribution: heacu commenteduseful
Comment #54
donquixote CreditAttribution: donquixote commentedThe $tooltip_field solution 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 the patch it says
Correct would be:
(with a few sanity checks here and there)
-----
There is still one problem with this:
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.
Until then, the above fix is a decent solution.
EDIT: Discussion moved to
#914108: Tooltip and Marker should use rendered field, not raw field from the database.
Comment #55
donquixote CreditAttribution: donquixote commentedThe same 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.
Comment #56
donquixote CreditAttribution: donquixote commentedMy current use case is to give past events a gray marker, ongoing events an orange marker, and future events a green marker.
I patched the code as explained in #53 and #54, and this does the job.
There is still one thing missing: The cluster icons (Poskanzer) look all the same, no matter what markers they represent.
It would be great if the colors of the cluster icon would give a hint on the contained markers, so that clusters that contain future events would stick out.
Comment #57
rooby CreditAttribution: rooby commented@donquixote,
Can you please open new issue(s) for these things.
This issue as it was has already been fixed.
Comment #59
branana CreditAttribution: branana commentedIt wasn't immediately clear to me that the Center on Argument NID only would center on the provided NID if the NID was part of the returned rows from the query. I needed to center on the Node Location coordinate provided by an arbitrary node that will not be part of the result. Here are the changes I made:
Comment #60
rooby CreditAttribution: rooby commented@branana:
This is definitely a new feature request, so can you please open a new issue with your patch. It makes it easier to keep track of everything.
Also, a couple of notes:
This should not be here as it just adds whitespace to the end of the line.
Notes on coding standards - see http://drupal.org/coding-standards
* Comment sentences should be capitalized and use punctuation like a period on the end.
* There should be a space between 'if' and the opening parenthesis.
* If statements should have a space between the closing parenthesis and the opening curly brace.
* Lines should not have trailing whitespace.
* Blank lines should not contain any whitespace.
Powered by Dreditor.
Comment #61
eiland CreditAttribution: eiland commentedIm not sure how the module development chain goes, but can #284481: GMap Views - show distinct markers or links for places with same lat/long be still included in the dev?
Comment #63
donquixote CreditAttribution: donquixote commented@donquixote (#54): "solution does not do what (I think) it's supposed to do."
@rooby (#57): "Can you please open new issue(s) for these things."
New issue at
#914108: Tooltip and Marker should use rendered field, not raw field from the database.
Comment #64
rooby CreditAttribution: rooby commented@eiland,
Yes, that issue is still active so can still make it into the dev version.
@donquixote,
Thanks.
Comment #65
pacome CreditAttribution: pacome commented[edit]
Ooops, I should have openned my eyes before to write this comment... :)
Regards
-P