openlayers-8.x-4.x-dev/src/Plugin/Source/BingMaps/BingMaps.php

src/Plugin/Source/BingMaps/BingMaps.php
<?php

namespace Drupal\openlayers\Plugin\Source\BingMaps;

use Drupal\openlayers\Types\Source;

/**
 * FIX - Insert short comment here.
 *
 * @OpenlayersPlugin(
 *   id = "ol_source_bingmaps",
 *   label = @Translation("Bing Maps"),
 *   description = @Translation("TODO..."),
 *   service = "openlayers.Source:BingMaps",
 *   library = "openlayers-plugin-source-bingmaps",
 *   is_configurable = "true",
 *   type = "source"
 * )
 */
class BingMaps extends Source {

  /**
   * {@inheritdoc}
   */
  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),
    );
  }

}

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc