You are here

public function BingMaps::optionsForm in Openlayers 7.3

@TODO What is this return? If it is the form, why is form by reference?

Overrides Base::optionsForm

File

src/Plugin/Source/BingMaps/BingMaps.php, line 23
Source: BingMaps.

Class

BingMaps
Class BingMaps.

Namespace

Drupal\openlayers\Plugin\Source\BingMaps

Code

public function optionsForm(array &$form, array &$form_state) {
  $layer_types = array(
    'Road',
    'Aerial',
    'AerialWithLabels',
    'collinsBart',
    'ordnanceSurvey',
  );
  $form['options']['key'] = array(
    '#title' => t('Key'),
    '#type' => 'textfield',
    '#default_value' => $this
      ->getOption('key', ''),
  );
  $form['options']['imagerySet'] = array(
    '#title' => t('Imagery set'),
    '#type' => 'select',
    '#default_value' => $this
      ->getOption('imagerySet', 'Road'),
    '#options' => array_combine($layer_types, $layer_types),
  );
}