diff --git a/sites/all/modules/contrib/geocoder/geocoder.admin.inc b/sites/all/modules/contrib/geocoder/geocoder.admin.inc index ad37fa5..ca00529 100644 --- a/sites/all/modules/contrib/geocoder/geocoder.admin.inc +++ b/sites/all/modules/contrib/geocoder/geocoder.admin.inc @@ -26,14 +26,6 @@ function geocoder_admin_settings($form, &$form_state) { '#required' => FALSE, ); - $form['geocoder_apikey_google'] = array( - '#type' => 'textfield', - '#title' => t('Google Maps API Key'), - '#description' => t('If your share an IP address with others developers (ie on Pantheon dev/staging boxes) then you\'ll need your own key, else you hit the 2500 limit quickly each day). If you are just running on a local box, or your own server, you can go ahead and leave this blank.'), - '#default_value' => empty($geocoder_settings['geocoder_apikey_google']) ? '' : $geocoder_settings['geocoder_apikey_google'], - '#required' => FALSE, - ); - $form['#submit'][] = 'geocoder_admin_settings_submit'; return system_settings_form($form); } @@ -48,6 +40,5 @@ function geocoder_admin_settings_submit($form, &$form_state) { $geocoder_settings= variable_get("geocoder_settings", array()); $geocoder_settings['geocoder_apikey_yahoo'] = trim($form_state['values']['geocoder_apikey_yahoo']); $geocoder_settings['geocoder_apikey_yandex'] = trim($form_state['values']['geocoder_apikey_yandex']); - $geocoder_settings['geocoder_apikey_google'] = trim($form_state['values']['geocoder_apikey_google']); variable_set("geocoder_settings", $geocoder_settings); } diff --git a/sites/all/modules/contrib/geocoder/plugins/geocoder_handler/google.inc b/sites/all/modules/contrib/geocoder/plugins/geocoder_handler/google.inc index 75ba2cb..5b1ddb9 100755 --- a/sites/all/modules/contrib/geocoder/plugins/geocoder_handler/google.inc +++ b/sites/all/modules/contrib/geocoder/plugins/geocoder_handler/google.inc @@ -27,27 +27,12 @@ function geocoder_google($address, $options = array()) { try { geophp_load(); - $geocoder_settings = variable_get("geocoder_settings", array()); + $query = array( + 'address' => $address, + 'sensor' => 'false', + ); - if ($geocoder_settings['geocoder_apikey_google'] != "") { - $query = array( - 'address' => $address, - 'sensor' => 'false', - 'key' => $geocoder_settings['geocoder_apikey_google'], - ); - - // With a key mist be https - $url = url("https://maps.googleapis.com/maps/api/geocode/json", array('query' => $query)); - - } - else { - $query = array( - 'address' => $address, - 'sensor' => 'false', - ); - - $url = url("http://maps.googleapis.com/maps/api/geocode/json", array('query' => $query)); - } + $url = url("http://maps.googleapis.com/maps/api/geocode/json", array('query' => $query)); $result = drupal_http_request($url); if (isset($result->error)) {