Skip to content
Snippets Groups Projects
Commit fde3385e authored by webgeer's avatar webgeer
Browse files
parent bfa85669
No related branches found
No related tags found
No related merge requests found
......@@ -136,7 +136,17 @@ function gmap_location_node_page($nn=null) {
$newmarker['label'] .= image_display($n,'thumbnail');
break;
default:
$newmarker['label'] = strtr(theme('node',$n,true),"'\n\r",'" '); //make sure it all goes on one line.
// Allow a module (where the module name matches the node type name)
// to define a custom display for the google map label.
// For this to work with flexinode defined data types,
// a module called 'flexinode_#.module' in your site's module
// directory and add hook_gmapnodelabel($node, $location) to it.
// Be sure to enable your 'flexinode_#.module'.
if($labelresult=module_invoke(strtr($n->type,'-','_'), 'gmapnodelabel', $n, $locn)) {
$newmarker['label'] = strtr($labelresult, "'\n\r", '" ');
} else {
$newmarker['label'] = strtr(theme('node',$n,true),"'\n\r",'" '); //make sure it all goes on one line.
}
}
$newmarker['point']= $locn->latitude.','.$locn->longitude;
$newmarker['markername']=variable_get('gmap_node_map_marker_'.$n->type, '');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment