protected function GeoJson::defineOptions in Views GeoJSON 8
Information about options for all kinds of purposes will be held here.
'option_name' => array(
- 'default' => default value,
- 'contains' => (optional) array of items this contains, with its own
defaults, etc. If contains is set, the default will be ignored and
assumed to be array().
),
Return value
array Returns the options of this handler/plugin.
Overrides StylePluginBase::defineOptions
File
- src/
Plugin/ views/ style/ GeoJson.php, line 414
Class
- GeoJson
- Style plugin to render view as GeoJSON code.
Namespace
Drupal\views_geojson\Plugin\views\styleCode
protected function defineOptions() {
$options = parent::defineOptions();
$options['data_source'] = [
'contains' => [
'value' => [
'default' => 'asc',
],
'latitude' => [
'default' => 0,
],
'longitude' => [
'default' => 0,
],
'geofield' => [
'default' => 0,
],
'geolocation' => [
'default' => 0,
],
'wkt' => [
'default' => 0,
],
'name_field' => [
'default' => 0,
],
'description_field' => [
'default' => 0,
],
],
];
$options['attributes'] = [
'default' => NULL,
'translatable' => FALSE,
];
$options['jsonp_prefix'] = [
'default' => NULL,
'translatable' => FALSE,
];
return $options;
}