private function ip_geoloc_plugin_style_leaflet::_add_visitor_marker in IP Geolocation Views & Maps 7
1 call to ip_geoloc_plugin_style_leaflet::_add_visitor_marker()
- ip_geoloc_plugin_style_leaflet::options_form in views/
ip_geoloc_plugin_style_leaflet.inc - Implements options_form().
File
- views/
ip_geoloc_plugin_style_leaflet.inc, line 295
Class
Code
private function _add_visitor_marker(&$form, &$weight) {
$form['visitor_marker'] = array(
'#type' => 'fieldset',
'#title' => t('Visitor marker style'),
'#description' => t('For the visitor marker to show, enable the <em>Set my location</em> block and/or tick the option to periodically reverse-geocode via Google, under the <a href="@config_page">Data collection options</a>.', array(
'@config_page' => url('admin/config/system/ip_geoloc'),
)),
'#weight' => $weight++,
);
$visitor_marker_colors = array(
'none' => '<' . t('none') . '>',
) + ip_geoloc_marker_colors();
unset($visitor_marker_colors['0']);
$form['visitor_marker']['visitor_marker_color'] = array(
'#title' => t('Style/color'),
'#type' => 'select',
'#multiple' => FALSE,
'#default_value' => $this->options['visitor_marker']['visitor_marker_color'],
'#options' => $visitor_marker_colors,
'#attributes' => array(
'class' => array(
'marker-color',
),
),
);
$form['visitor_marker']['visitor_marker_special_char'] = array(
'#title' => t('Font icon character'),
'#type' => 'textfield',
'#size' => 8,
'#default_value' => $this->options['visitor_marker']['visitor_marker_special_char'],
'#description' => t('As above'),
);
$form['visitor_marker']['visitor_marker_special_char_class'] = array(
'#title' => t('Font icon class'),
'#type' => 'textfield',
'#size' => 25,
'#default_value' => $this->options['visitor_marker']['visitor_marker_special_char_class'],
'#description' => t('As above.'),
);
$form['visitor_marker']['visitor_marker_balloon_text'] = array(
'#title' => t('Visitor balloon text'),
'#type' => 'textarea',
'#rows' => 3,
'#default_value' => $this->options['visitor_marker']['visitor_marker_balloon_text'],
'#description' => t("You may use safe HTML and tokens. The special token <em>[visitor-location:surrounding-polygon]</em> returns the title of the node that contains a Geofield polygon that surrounds the visitor's location."),
);
$form['visitor_marker']['token_browser'] = array(
'#type' => 'markup',
'#theme' => 'token_tree_link',
'#token_types' => array(
'visitor-location',
),
'#prefix' => '<div>',
'#suffix' => '</div>',
);
$form['visitor_marker']['visitor_marker_accuracy_circle'] = array(
'#title' => t('Accuracy circle'),
'#type' => 'checkbox',
'#default_value' => $this->options['visitor_marker']['visitor_marker_accuracy_circle'],
'#description' => t("Display a circle depicting where the visitor's real location is most likely to be."),
);
}