GMap in view attachment and view pane disappears in Views 2.3...
| Project: | GMap Module |
| Version: | 6.x-1.1-rc1 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
I've got a view that lists a number of nodes that all contain valid location data. I added a view attachment to the beginning of the view output to also map these nodes. Works like a charm! Thank you gmap!
I've also got two exposed filters, one for city, and one for taxonomy. City works as expected, passing the exposed filters to the views attachment just fine, but as soon as you use the taxonomy filter, the gmap returned is empty! (though the view outputs nodes matching the taxonomy just fine).
The attachment div it returns has only it's admin links, and the "view-content" div for the gmap is entirely missing.
My gut feeling is that this is a mishandling somewhere along the line for gmap, though this may be a views issue (I'm using views 6.x-2.3).
If anyone has any ideas, I'm all ears!

#1
While attempting to ignore/move-on from my previous category issue above, I needed to theme the output of the Gmap marker popup. Searches lead me to http://drupal.org/node/130671, now seemingly defunct leading to a theme hook. Darn link rot.
Anyways, I come to attempt to re-theme the gmap output in some way by saving a copy of "gmap-view-gmap.tpl.php" into my theme directory. With ZERO changes made to this file, after copying it and clearing the template cache, the gmap on my views output disappears completely, no matter what the filter (or lack thereof). As soon as the file is deleted from my theme folder and the template cache is cleared again, the map reappears, back to normal.
What the heck?
On a side note, I've failed to come to a proper conclusion for an appropriate templating method for gmap node-popups (or even just a specific contemplate based if statement that works).. and will be resorting to css based map popup templating for now (Augh!)
If anyone wants to save me from my torment or send me to a helpful post, I'd be quite obliged.
#2
I've re tested my original post problem on a separate site, and it does in fact work as expected (As far as showing the map when using a taxonomy exposed filter, as for the gmap-view-gmap.tpl.php override, problem, I haven't tested that)
Turns out I have a views version discrepancy between my working and non working sites! I'm using views 2.2 on the site that displays the gmap properly, and views 2.3 for the site that kills the map on taxonomy filtering!
So! What the heck happened with Views 2.3? I'd post something to their issue queue, but this is far too specific to gmap...
Anyone else out there have problems with gmap and views 2.3?
#3
+1
#4
I've got the GMap disappearing right after I do a sort-by-column-header on my Table-Style Attachment View. Currently having to refresh my browser in order to get the GMap back.
#5
I have views 2.3 as well and I'm having the same issue. When I flush the caches, however, the map comes back.
Has any one tried down grading to 2.2 to confirm that obervation? that's my next step since I've not much else to go on at this point.
tks
-CWD
#6
As a workaround, can't we just clone the GMAP View and use on this new View the settings intended for the Attachment View? ....or are there displays that you can accomplish only with an Attachment View?
#7
well, as ridiculous/embarrasing as the solution was for me, I've solved my problem. I had a tpl in there to theme around the map. I killed that tpl and all the sudden everything works fine now.
=/
#8
I'm having the same problem (I'm using View 6.x-2.5 and GMap 6.x-1.1-rc1). When I use the default template everything works fine, but when I create my own template the map disappears. It gets displayed after a cache refresh, but then disappears when you reload the page.
Steps to reproduce: I made a copy of gmap-view-gmap.tpl.php (calling it gmap-view-gmap--MYVIEW.tpl.php) and put that in my theme folder. Clear the cache -> map is displayed correctly. Reload the page -> map disappears.
techninja: I don't think this is related to the version because I tried Views 6.x-2.2 and had the same problem. Are there any other differences between your working and non-working sites that might explain this, maybe in the way the View is configured?
#9
Same issue as Roobarb here.
Views 2.5 + Gmap 6.x-1.0
Can't add much to other reports.
I noticed that it works also when clearing only views cache and not the whole site cache. However if you disable views data caching from views tools the map disappears again even if views cache is supposed to be disabled.
While resolving the issue can anybody think of a workaround? I'm trying to adjust some settings in the map before it gets rendered, basically because the macro field in views interface is too short. Can this be done with a function instead of using the template?
thx
#10
Just a little addition.
Simply copying gmap-view-gmap.tpl.php in your theme directory breaks the view. So you don't even have to rename it ;)
cheers
#11
I have the same issue withing views 2.5 !!! The visitors search the map !!! but for me, there was no problem with 2.3
#12
same for me with latest -dev and Views 2.3. Simply putting gmap-view-gmap.tpl.php in my theme directory causes the map to disapear. I can get it working again by also copying the function
gmap_preprocess_gmap_view_gmap()into my themes template.php and renaming tomytheme_preprocess_gmap_view_gmap()#13
subscribing
#14
Also occurred for me using Views 2.5 and the work around in #12 seems to work. Thank you mrfelton!
#15
subscribing, similar problem with views 2.6 and gmap 6.x-1.x-dev
#16
I am having a similar issues with Views Panes and trying to place it in a Panel.
#17
No solution ?
#18
See this comment - http://drupal.org/node/286653#comment-1791924 - there are some patches that may help you get the map working in panels.
#19
So I have gotten the map showing up in panels 3 but only be creating it as a Page type display, choosing the view itself in the panel (rather than the view pane specifically), then on the ensuing screen choosing the page display.
Maybe this is something to do with panels 3 evolving but at least I got my map to show up.
#20
i am having a similar problem where the map will show up as an attachment initially. But when I make filter selections I get
Javascript is required to view this map.
Chris
#21
subscribing
#22
subscribing