private function ip_geoloc_plugin_style_leaflet::_add_vector_display_options in IP Geolocation Views & Maps 7
1 call to ip_geoloc_plugin_style_leaflet::_add_vector_display_options()
- 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 987
Class
Code
private function _add_vector_display_options(&$form, &$weight) {
// From leaflet/leaflet.formatters.inc. Leaflet Views can remain disabled.
$form['vector_display'] = leaflet_form_elements('vector_display', $this->options, array(
'path' => 'style_options',
));
$form['vector_display']['#title'] = t('Options for Polygons, Polylines and Circles');
$link_options = array(
'attributes' => array(
'target' => 'leaflet-manual',
),
);
$descr1 = t('These settings will overwrite these !options, that apply to Polygons, Multi-Polygons Polylines and Circles.', array(
'!options' => l(t('default Leaflet options'), 'http://leafletjs.com/reference.html#path', $link_options),
));
$descr2 = t('You may use tokens. For example, if your location content type has a color field, e.g. [node:field_color], you can use that to assign different colors to your polygons, polylines and circles.');
$form['vector_display']['#description'] = $descr1 . '<br/>' . $descr2;
$form['vector_display']['#weight'] = $weight++;
$form['vector_display']['token_browser'] = array(
'#type' => 'markup',
'#theme' => 'token_tree_link',
'#token_types' => array(
'node',
),
'#weight' => -1,
);
// This is alread provided by IGPV&M.
unset($form['vector_display']['clickable']);
}