Hide map markers

BWPanda - July 3, 2009 - 01:09
Project:GMap Module
Version:6.x-1.1-rc1
Component:Miscellaneous
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed
Description

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?

#1

BWPanda - July 12, 2009 - 23:57
Title:Hide markers in Views template files» Hide map markers

Still needing urgent help with this...

#2

BWPanda - July 22, 2009 - 23:58

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

BWPanda - July 24, 2009 - 03:49
Status:active» fixed

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

System Message - August 7, 2009 - 03:50
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.