You are here

function openlayers_layer_type_google::settings_form in Openlayers 6.2

Same name and namespace in other branches
  1. 7.2 plugins/layer_types/openlayers_layer_type_google.inc \openlayers_layer_type_google::settings_form()

Layer-type-wide settings form

File

includes/layer_types/google.inc, line 71
Google Layer Type

Class

openlayers_layer_type_google
OpenLayers Google Layer Type class

Code

function settings_form() {
  return array(
    'openlayers_google_version' => array(
      '#type' => 'select',
      '#title' => t('Google Maps API version'),
      '#description' => t('If you use Google Maps v3, an API key is not necessary.'),
      '#options' => array(
        '2' => t('v2'),
        '3.2' => t('v3.2'),
      ),
      '#default_value' => variable_get('openlayers_google_version', '2'),
    ),
    'openlayers_layers_google_api' => array(
      '#type' => 'textfield',
      '#title' => t('Google API Key'),
      '#default_value' => variable_get('openlayers_layers_google_api', ''),
      '#description' => t('<a href="@google">Obtain an API key from Google for your domain</a>', array(
        '@google' => 'http://code.google.com/apis/maps/signup.html',
      )),
    ),
    'openlayers_layers_google_language' => array(
      '#type' => 'textfield',
      '#title' => t('Language'),
      '#description' => t('This will set the language used
          for the interface (like attribution) as well as tiles,
          as supported by Google.  By default, Google Map API will
          determine the language automatically.  Only use this is you
          want to force a specific language.  Please see
          <a href="!url">this list of languages</a>.', array(
        '!url' => 'http://sites.google.com/site/tomihasa/google-language-codes',
      )),
      '#default_value' => variable_get('openlayers_layers_google_language', ''),
    ),
  );
}