function getlocations_get_markertypes in Get Locations 6.2
Same name and namespace in other branches
- 6 getlocations.module \getlocations_get_markertypes()
- 7 getlocations.module \getlocations_get_markertypes()
4 calls to getlocations_get_markertypes()
- getlocations_load_location in ./
getlocations.module - getlocations_nids in ./
getlocations.module - Menu callback
- getlocations_nodemap in ./
getlocations.module - Menu callback
- getlocations_typemap in ./
getlocations.module - Menu callback
File
- ./
getlocations.module, line 1099 - Displays locations on a map. for Drupal 6 using version 3 googlemaps API
Code
function getlocations_get_markertypes($type) {
$getlocations_defaults = getlocations_defaults();
$default_marker = $getlocations_defaults['node_map_marker'];
$markertypes = array();
if ($type == 'node') {
$content_types = getlocations_get_types();
$getlocations_node_marker = variable_get('getlocations_node_marker', array(
'enable' => 0,
));
foreach ($content_types as $content_type => $name) {
if ($getlocations_node_marker['enable'] && isset($getlocations_node_marker['content_type'][$content_type]['map_marker'])) {
$markertypes[$content_type] = $getlocations_node_marker['content_type'][$content_type]['map_marker'];
}
else {
$markertypes[$content_type] = $default_marker;
}
}
return $markertypes;
}
else {
return FALSE;
}
}