function geolocation_googlemaps_field_formatter_settings_summary in Geolocation Field 7
Implements hook_field_formatter_settings_summary().
File
- modules/
geolocation_googlemaps/ geolocation_googlemaps.module, line 159 - Google Maps widget and formatters for Geolocation.
Code
function geolocation_googlemaps_field_formatter_settings_summary($field, $instance, $view_mode) {
$display = $instance['display'][$view_mode];
$type = $display['type'];
$settings = $display['settings'];
$summary = t("<strong>Map:</strong> !mapwidth by !mapheight", array(
'!mapwidth' => $settings['map_width'],
'!mapheight' => $settings['map_height'],
));
switch ($type) {
case 'geolocation_googlemaps_static':
$summary .= ' (' . $settings['map_imageformat'] . ')';
$summary .= '<br />';
break;
case 'geolocation_googlemaps_dynamic':
$summary .= '<br />';
$scrl = $settings['map_scrollwheel'] ? t('Yes') : t('No');
$summary .= '<strong>Scrollable:</strong> ' . $scrl . '<br />';
break;
}
$summary .= '<strong>Type:</strong> ' . $settings['map_maptype'] . '<br />';
$summary .= '<strong>Zoom:</strong> ' . $settings['map_zoomlevel'];
if (!empty($settings['marker_icon'])) {
$vars = array(
'path' => $settings['marker_icon'],
);
$summary .= '<br /><strong>Icon:</strong> ' . theme('image', $vars);
}
return $summary;
}