I'm using gmap module to mark job locations on a map. It now shows all locations of content type: jobs. Is there any way I can only mark the displayed jobs from my view block? I filter the jobs through exposed filters.
EDIT:
Just going to add this code here, might be useful for some. It puts the attachment in a block so you have more control over it.
<?php
//Puts gmap attachment in block so it's easier to theme
function gmap_block_block_info() {
$blocks['gmap_attachment'] = array(
'info' => t('Gmap Attachment'),
'cache' => DRUPAL_NO_CACHE,
);
return $blocks;
}
function gmap_block_block_view($delta = '') {
$block = array();
if ($delta == 'gmap_attachment') {
// $block['subject'] = t('Gmap Attachment');
// Load the view.
$view = views_embed_view('jobs_view_block', 'gmap_attachment');
//('machine_name_view', 'machine_name_display)
if ($view) {
$block['content'] = $view;
}
else {
$block['content'] = t('The view is empty');
}
}
return $block;
}