Posted by BWPanda on July 3, 2009 at 1:09am
Jump to:
| Project: | GMap Module |
| Version: | 6.x-1.1-rc1 |
| Component: | Miscellaneous |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
I'm using Views to display a map of markers, but would like to hide/not display certain ones. I'm trying to use the Views template files to do this, but using the 'Row style output' only hides what's in the info window of the marker and not the marker itself, while using the 'Style output' hides the whole map...
How can I hide individual markers in Views?
Comments
#1
Still needing urgent help with this...
#2
I have the following code to check whether there are activities or accommodation at a marker's location:
<?php
$actaccom = views_get_view('Activities_Accommodation');
$actaccom->set_display();
$actaccom->pre_execute(array($fields['title']->raw));
$actaccom->execute('page_1');
?>
<?php if (!empty($actaccom->result)): ?>
[code to display markers goes here...]
<?php endif; ?>
I just need to know where to place the code so that I can control the display of certain markers. As stated above, the two template files I tried didn't quite work...
Any help with this would be much appreciated!
#3
Finally worked it out, I think.
I ended up using that code as a default PHP argument in the map-producing view. Took a bit of fiddling to get it working properly, but seems to be fine now...
Fingers crossed.
#4
Automatically closed -- issue fixed for 2 weeks with no activity.