/** * Implementation of hook_gmap(). */ function gmap_markertypes_gmap($op, &$map) { switch ($op) { case 'pre_theme_map': if(isset($map['markers'])) { drupal_add_css(drupal_get_path('module', 'et_custom') .'/gmap_markerlist/gmap_markerlist.css'); drupal_add_js(drupal_get_path('module', 'et_custom') .'/gmap_markerlist/gmap_markerlist.js'); foreach($map['markers'] as &$marker) { $nid = split('/', $marker['rmt'] );$nid = $nid[0]; $node = node_load($nid); $marker['type_readable'] = node_get_types('name', $node->type).'s'; $marker['type'] = $node->type; } } break; case 'parse_macro': break; } }