Setting: I have enabled the Gmap Location block on individual node pages of Event content type so that a map of the location of each event is show on the full node page. In the gmap module, "show info bubble" is turned on for when markers are clicked.
Behavior: On clicking the marker within the block, an empty bubble appears.
Expected behavior: Some node content would be shown in the info bubble like with the node map visible at site/map/node.
Question: How can this be customized? I would like atleast some Node data to show in that bubble. For example: Event start time or Location name.
Comments
Comment #1
Daryljames commentedI'm seeing the same behavior
Comment #2
hessebar commentedI am having the same issue. I tried to use a views block that dispaly on a location node, but the block shows all the nodes. I tried filter by nid to display only the location node I am on. also I tried arguments. Still have no luck.
Comment #3
ajzz commentedShould we promote this topic from support request to bug report?
Comment #4
pixelenvy commentedTry setting the row style to 'fields' in your view and see if that returns some content in the info window? There's also an issue with using the latest releases of views and gmap together.
I'm using views 6.x-2.6 with gmap 6.x-1.x-dev and got it working like this.
Comment #5
ajzz commented@pixelenvy: thanks for the tip. I am using and want the functionality of the location map block that comes with the gmap location module, which will allow the block to be shown only on nodes where location information exists. I tried creating a views block but the only the field labels show up, while the field data do not. Also, there is no easy way to control showing the block only on pages with location info.
I'd like to be able to customize the bubble info in the block that comes with the module, because it already provides the functionality I seek.
Comment #6
dan.crouthamel commentedI'm seeing the same thing and I think it started happening after updating to the latest version of views. I noticed that $fields['field']->content is empty, where before it actually had info. I'll try using the latest dev version of gmap to see if that solves the issue.
OK - updating to the latest dev version solved the problem for me.
Comment #7
ajzz commentedHere's the behavior of the Marker in the default "Location Map" block that ships with the module, when enabled in node content.
CVS TAG: Behavior (note the settings are "Open Info Bubble" in GMap Location for all cases below)
DRUPAL-6--1-0: No bubble on click
DRUPAL-6--1-1-RC1: Bubble opens, but no information inside it.
HEAD: No bubble on click (note there is a db update in node_location between RC1 and HEAD)
Changing the version of this issue to RC1 release
Comment #8
gregglesI think this is probably a duplicate or at least very similar to #623234: Views 2.7 - breaks field output - GMap marker info window (bubble) doesn't display fields correctly though the "node location" map is served up slightly differently than nodes (I think).
Comment #9
ajzz commented@greggles: this thread is independent of Views module. the context here is the stock "Location Map" block that comes with the module. You're right that the solution may be similar, but I need help figuring out what that may be.
Comment #10
ajzz commentedClarified title to prevent confusion with similar Views related issues noted in #8.
Comment #11
ctalley5 commentedSame. Subscribe...
Comment #12
ajzz commentedPromoting to bug report since this issue ships with current code and is not "by design".
Comment #13
KrisG commentedSubscribe
Comment #14
mathieu commentedsubscribe
Comment #15
weblance commentedsubscribe
Comment #16
franksweb commentedsubscribe
Comment #17
bailsbails commentedHi i've faced this issue and rolling back to views-6.x-2.6 Fixes my missing bubble info.
Comment #18
edg commentedsubscribe
Comment #19
ajzz commented@bailsbails: if you read the thread above, you'll realize this thread is not a views (block) related issue. this is for the block that ships with module which does not require views module.
Comment #20
Ela commented+1
Comment #21
elioshI think i found the problem:
As you can see, it tries to print $marker['text'] as info bubble content.
But if we take a look at the block view function:
we can see that we don't have the "text" attribute....
I'll try to fix that with a patch. Stay tuned :-D
Comment #22
elioshAs i said before, i found a solution adding this line:
'text' => theme('gmap_location_infowindow_node', $node),to the $markers array item.
It works.
Comment #23
Ela commentedCould you point me out in the direction exactly where to add this code?
Comment #24
elioshfile is gmap_location.module
function name is
region in function is :
Comment #25
jim22 commentedThis didn't work for me. It doesn't work in a "page" View, or a "block" View. I still get empty info windows (balloons) in Gmap. When I turn on the labels for any fields in my View, I am getting the labels correctly in info window, but not the field data.
Any ideas?
Thanks.
I'm using:
Drupal 6.15
Views 6.x-2.x-dev (downloaded Jan 18th, 2010) (I tried multiple versions of Views, with no luck.)
Gmap 6.x-1.0 ( I tried to install Gmap's latest dev version, but it's still showing up 1.0 )
Comment #26
Ela commentedWorks great, but once clicked the whole node loads into the info bubble..
How would one set it up to only show location, like city, state, or location name?
Comment #27
Ela commentedadding
'text' => $markertitle,
instead adds the title of the node.. so that's better for me for now..
Does anyone know how to put the location detailed info there instead?
Comment #28
pawel.traczynski commentedTha best way to pass anything to be displayed inside the bubble is to use the gmap_simple_map() function.
You can add this function inside your theme's node.tpl.php file or node-[nodetype].tpl.php file of the node type that you want to display the map for, like so:
This method works very well and allows to easily insert anything inside the bubble.
Hope it helps.
Cheers.
Comment #29
Ela commentedHi there..
This might be a silly question, but is gmap_simple_map part of the gmap module?
Comment #30
bstrange commentedTried all the suggestions above and #28 and no love for my bubbles... at this point I would just be overjoyed with the gmap macro code to disable the bubble all together as the "location map" block ignores the fact that I have marker action "do nothing" chosen in gmap settings.
At least that way it would look intentional rather than looking broken :P
Comment #31
pawel.traczynski commentedHey. Of course it is. You can check it out if you wan't - open the gmap.module file and navigate to the line 1124 to see its implementation.
Comment #32
aJob commentedGmap 6.x-1.x-dev made me happy again!
Comment #33
Ela commentedhi Pawel :)
Map shows, with no marker and I get an error: "Request for invalid marker set default!"
Any tips?
Comment #34
gregglesgiven aJob's comment marking this fixed.
Comment #35
hinanui commentedIf it can help anyone, to get directions from the bubble, I have used the solution #24 and some other code found somewhere else:
Comment #36
bstrange commentedat #34:
The Dev version worked great for preventing an 'empty' info bubble, however, as I had it set as "Do Nothing" in GMap and GMap Location in attempt to 'fix' the empty info bubble, now no matter what I choose in the settings, the marker 'does nothing'.
While this is better than 'empty' I would love it to display the location info in the marker. I have cleared site cache, regenerated the marker cache, nothing seems to work... it appears that whatever option you had selected when applying the Dev version is what you are 'stuck' with, but maybe I am missing something.
Any help would be greatly appreciated!
Comment #37
Weka commentedSubscribe
Comment #38
likewhoa commentedSubscribe
Comment #39
Ela commentedshould not be marked fixed if people are still having questions and are unable to get this to work for them :)
Comment #40
yogo2000 commentedIt works for me too !!!
just desactivate gmap module,
then uninstall gmap module and gmap taxonomy marker,
and remove the gmap directory
decompress the gmap-dev...tar.gz in /modules,
activate the module and
redo the gmap setup (google api key, default setup) and save
Thanks a lot, aJob !
Comment #41
bstrange commentedOK so I had a site that never had Gmap or Location installed. I installed the dev version, made sure all settings in gmap and gmap location were set to "open info window", enabled the location map block and then created a location based node. The marker does not display an empty info bubble, because it does not display an info bubble at all.
I like I said before, this is better than an empty info bubble as it looks intentional at least, but having the location information in the bubble would be better :P
It also appears that since updating to Dev, my node locations page no longer has any markers. The individual nodes all have a working location map block and marker; however the node locations page does not...
Comment #42
ad4m commentedHi,
I've had the same issue and I think I found a solution. Attaching a patch.
Comment #43
benstallings commentedBless you, ad4m. That solved my problem.
Comment #44
marshallexcavating commented@ad4m, Dose your Patch #42 fix the problem of no information displayed in the map pins when clicked or just make it possible to deactivate the map pins? I am having both problems(title but no content in pins when clicked, and can not disable click on pins to open). Both where working before I upgraded the module.
Thank you
Comment #45
marshallexcavating commentedPlease what problem dose patch from #42 ad4m fix?
Thank you.
Comment #46
freddy33r commentedInstructions found on #40 helped me. It works. Now the data in the infoWindow is not empty. I still need to style it though
Comment #47
ashley.maher@didymodesigns.com.au commentedad4m,
#42,
Solved my missing information in the bubble problem.
Thanks.
Regards,
Ashley Maher (didymo)
Comment #48
wolfram commentedsolved it for me too 1000 thx #42
Comment #49
sethhavens commentedsubscribing... gonna try patch
Comment #50
4aficiona2 commented... for #33
This error appears because the default value for markername is an empty '' instead of 'default' as it was mentioned above ...
Have a look at the function call below (third param).
Additionaly the location properties were read directly from $node->location instead of $location ... works for me, and no more empty infowindows ...
Comment #51
sethhavens commentedno joy with patch :-( have now tried to change click marker behaviour, set to "open link" and still getting empty info bubbles... hmmm!
trying dev version next
Comment #52
sethhavens commentedtried dev version... now clicking marker simply does nothing, regardless of settings - better than an empty bubble though!
everything else seems fine, including the "See map: Google Maps" link which I'm going to utilise instead
Comment #53
ctalley5 commentedDev. Fixed it for me as well.
Comment #54
jrchew commented#42 worked perfectly! Thanks a million!
Comment #55
m.sant commented#42 works against GMap Module 6.x-1.1-rc1 using Drupal 6.16, Location 6.x-3.x-dev and Views 6.x-2.8
Many thanks to ad4m
Comment #56
baal32 commentedI'm a newbie so take with a grain of salt, but patch #42 appears to solve the issue wherein info bubbles are empty *in the context of gmap views* - it does not appear to change the behavior of the 'Location Block' delivered by gmap_location.module. It appears these are separate issues.
As noted above (#24), the lack of a 'text' key appears to be causing the problem. For a quick sanity check I added the 'text' key below:
and sure enough my bubbles for the location block all say 'test'. My gmap views, however, still work fine (thanks to the patch in #42).
One workaround might be to forgo the location block altogether and instead create a gmap view that takes an argument (the nid) and create a block display from it. Doesn't seem like an optimal solution however....
Comment #57
rbayliss commentedLikewise, #42 fixed the problem instantly. Thank you!
Comment #58
grendzy commentedAs mentioned in #34, this has been fixed in the latest dev.
http://drupalcode.org/viewvc/drupal/contributions/modules/gmap/gmap_plug...
If after upgrading to the latest -dev version you are still having issues, I think it would be better to open a new issue.
Comment #60
brentratliff commentedsubscribing
Comment #61
bstrange commentedOk so I have tried 6.x-1.x-dev on a 3rd, fresh site, Dev does not fix the problem. It removes the empty info bubble. It does NOT fix it so there is information IN the bubble.
6.x-1.1-rc1 had empty bubble. Tied patch in #42 with no luck.
Will try patch in #42 against dev version, but this error is still everpresent.
I'd also like to try #50, but I'm not sure where he applied that code.
It is important to note that this is a problem with Location Map block, NOT with gmap block and views... not sure if #32 and 58 are aware of this but all the Dev version does is remove the ability for you to have an info bubble.
I suppose I could use views and arguments to produce a node specific map but this way is sooooooo much easier... if it worked.
I'd also like to add that as stated above, no bubble is better than an empty bubble, but there is still an error that needs to be resolved.
I have mentioned this in #36 and 41, and personally find it irresponsible for the status to be set to 'fixed' when it is not. Regardless of whether #42 fixes this once I patch it against Dev, it still doesn't qualify the issue as fixed, just 'patched by user'.
Edit to add:
42 does NOT work against dev. Dev already contains the code from #42 on lines 142-145
maybe the fix from #50 would work if I had any idea where to apply it...
Comment #62
organicwire commentedI assume that it's better to have no bubble at all if there's no text for the bubble than having a buggy bubble. Therefore in sites/all/modules/gmap/gmap.module i changed the following:
Old code
Here HTML code is created as the markers text attribute even in the case that the marker's text is not set. This causes an empty bubble to be created.
New code (with an IF-clause checking for the text attribute)
Comment #63
Durrok commentedAppears to be fixed in 6.x-1.1.
Comment #64
andrewtf commentedJust updated my GMap module to 6.x-1.1 (from 6.x-1.1-rc1) and still experiencing the problem.
Comment #65
pawel.traczynski commentedAnswer to #29 - It sure is :-)
Comment #66
kappaluppa commentedHALLELUJAH!!!!! #50 WORKED!! thank you @pawel.traczynski for pasting the code and @zoorock for helping to clear up the error!!
Comment #67
AndreyN commentedI use Gmap module 6x-1.1 and get emtpy bubble.
Make patch for gmap_location.module:
It's work for me.
Comment #68
jeffschulerAndreyN's suggestion in #67 worked for me.
Here's a patch doing the same thing, with a little more formatting, (though US-address centric.)
This would, ideally, pull in the location module's default address formatting, -- is there a theme function to use? -- or create our own theme function to allow easy overriding.
This patch works for 6.x-1.1, though not 6.x-1.x-dev, though it applies.
Comment #69
pedroportella commentedThis is the patch for the comment #24.
Now on my template.php I can have something like:
Comment #70
amstel commented#67 also worked for me, plus I added some extra information to the bubble. I wanted to have an URL for each location, so I used the location fax module and changed it's name for website.
For those who could not apply the patch of #69 like me, just edit gmap_location.module and add the 'text ' line.
Comment #71
podarokcan You provide a patch against latest dev?
6.x minimally supported after porting this for latest release
Comment #72
summit commentedHi, Yes please a patch for info bubble on 7.dev!
Greetings, Martijn
Comment #73
navi85sin commentedI was able to get info in bubble on url /locationmap
But i was not able to get anything in bubble in location map block.
I have changed the following code in locationmap.js
Change the above code with :
Comment #74
benstallings commented