You are here

public function BBoxArgument::buildOptionsForm in Views GeoJSON 8

Provide a form to edit options for this plugin.

Overrides StringArgument::buildOptionsForm

File

src/Plugin/views/argument/BBoxArgument.php, line 44

Class

BBoxArgument
Argument handler for Bounding Boxes.

Namespace

Drupal\views_geojson\Plugin\views\argument

Code

public function buildOptionsForm(&$form, FormStateInterface $form_state) {
  parent::buildOptionsForm($form, $form_state);
  unset($form['case']);
  unset($form['path_case']);
  $form['description']['#markup'] .= $this
    ->t('<br><strong>The format should be: <em>"left,bottom,right,top"</em></strong>.');
  $form['round_coordinates'] = [
    '#type' => 'checkbox',
    '#title' => $this
      ->t('Round coordinates'),
    '#default_value' => $this->options['title'],
    '#description' => $this
      ->t('Round coordinates to two decimal places. This can help in caching bounding box queries. For instance, "-0.542,51.344,-0.367,51.368" and "-0.541,51.343,-0.368,51.369" would use the same SQL query.'),
  ];
}