Skip to content
Snippets Groups Projects
Commit abf2ecfb authored by Kleve's avatar Kleve Committed by haiiro.shimeji
Browse files

Issue #1506434 Make the API key field optional

parent 4f4ad2bc
No related branches found
No related tags found
No related merge requests found
...@@ -908,12 +908,6 @@ function gmap_map_cleanup(&$map) { ...@@ -908,12 +908,6 @@ function gmap_map_cleanup(&$map) {
function theme_gmap($variables) { function theme_gmap($variables) {
$element = $variables['element']; $element = $variables['element'];
// Usability: Prevent js errors on first visit to settings page, etc.
// Of course it will still error if the *wrong* key is on file.
if (gmap_get_key() == '') {
return t('Unable to render map: Google Maps API key is missing.');
}
// Track the mapids we've used already. // Track the mapids we've used already.
static $mapids = array(); static $mapids = array();
......
...@@ -34,7 +34,7 @@ function gmap_admin_settings($form, &$form_state) { ...@@ -34,7 +34,7 @@ function gmap_admin_settings($form, &$form_state) {
} }
$form['initialization']['googlemap_api_key']['#title'] = t('Google Maps API Key'); $form['initialization']['googlemap_api_key']['#title'] = t('Google Maps API Key');
$form['initialization']['googlemap_api_key']['#description'] = t('Your personal Googlemaps API key. You must get this for each separate website at <a href="http://code.google.com/apis/maps/signup.html">Google Map API website</a>.'); $form['initialization']['googlemap_api_key']['#description'] = t('Your personal Googlemaps API key. If you want to use an API key, you can get one at <a href="http://code.google.com/apis/maps/signup.html">Google Map API website</a>.');
$form['initialization']['rebuild'] = array( $form['initialization']['rebuild'] = array(
'#type' => 'fieldset', '#type' => 'fieldset',
......
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