Skip to content
Snippets Groups Projects
Commit 90cdb4e4 authored by webgeer's avatar webgeer
Browse files

Make geocoding optional

parent 1400556a
No related branches found
No related tags found
No related merge requests found
......@@ -724,16 +724,18 @@ function _gmap_location_map_form(&$form, &$edit, $type) {
'#description'=>t('The latitude and longitude will be entered here when you click on a location in the interactive map below. You can also fill in the values manually.'),
'#attributes'=>array('onchange'=>'gmap_textchange();'),
);
$form['coordinates']['gmap_location_address']=array(
'#type'=>'textfield',
'#title'=>t('Address'),
'#default_value'=>'',
'#size'=>30,
'#maxlength'=>120,
'#id'=>'gmap-address',
'#attributes'=>array('onchange'=>'gmap_geocodeaddress('.$map['id'].');'),
'#description'=>t('The address is used by the geocoding built into Google Maps.'),
);
if (variable_get('gmap_geocode', 1)) {
$form['coordinates']['gmap_location_address']=array(
'#type'=>'textfield',
'#title'=>t('Address'),
'#default_value'=>'',
'#size'=>30,
'#maxlength'=>120,
'#id'=>'gmap-address',
'#attributes'=>array('onchange'=>'gmap_geocodeaddress('.$map['id'].');'),
'#description'=>t('The address is used by the geocoding built into Google Maps.'),
);
}
$form['coordinates']['gmap_node']['#value']= gmap_set_location(
variable_get('gmap_'.$type.'_map', '[gmap|id='.$type.'map|center=0,30|control=Large|type=Hybrid|zoom=16|width=100%|height=400px]'),
$form['coordinates']['gmap_location_longitude'],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment