function getlocations_geojson_form in Get Locations 7
Same name and namespace in other branches
- 7.2 getlocations.module \getlocations_geojson_form()
2 calls to getlocations_geojson_form()
- getlocations_leaflet_display_options_form in modules/
getlocations_leaflet/ getlocations_leaflet.module - Function
- getlocations_map_display_options_form in ./
getlocations.module - Function
File
- ./
getlocations.module, line 4850 - getlocations.module @author Bob Hutchinson http://drupal.org/user/52366 @copyright GNU GPL
Code
function getlocations_geojson_form($defaults) {
// geojson
$form = array();
if (getlocations_get_geojson_path()) {
$form['geojson_enable'] = getlocations_element_map_checkbox(t('Enable GeoJSON library'), $defaults['geojson_enable'], t('Show GeoJSON data if defined'));
$form['geojson_enable']['#suffix'] = '<div id="wrap-getlocations-geojson-enable">';
$form['geojson_data'] = array(
'#type' => 'textarea',
'#title' => t('GeoJSON data'),
'#default_value' => $defaults['geojson_data'],
'#description' => t('A GeoJSON object. For more information about GeoJSON see !u', array(
'!u' => l(t('geojson.org'), 'http://www.geojson.org/', array(
'attributes' => array(
'target' => '_blank',
),
)),
)),
);
$form['geojson_options'] = array(
'#type' => 'textarea',
'#title' => t('GeoJSON options'),
'#default_value' => $defaults['geojson_options'],
'#description' => t('A JSON object.'),
);
$form['geojson_options']['#suffix'] = '</div>';
}
else {
$form['geojson_enable'] = array(
'#type' => 'value',
'#value' => 0,
);
$form['geojson_data'] = array(
'#type' => 'value',
'#value' => '',
);
$form['geojson_options'] = array(
'#type' => 'value',
'#value' => '',
);
}
return $form;
}