You are here

function leaflet_views_plugin_style::option_definition in Leaflet 7

Set default options.

Overrides views_plugin_style::option_definition

File

leaflet_views/leaflet_views_plugin_style.inc, line 52
Extension of the Views Plugin Style for Leaflet Map Adapted from the GeoField Map views module and the OpenLayers Views module.

Class

leaflet_views_plugin_style
@file Extension of the Views Plugin Style for Leaflet Map Adapted from the GeoField Map views module and the OpenLayers Views module.

Code

function option_definition() {
  $options = parent::option_definition();
  $options['entity_type'] = array(
    'default' => '',
  );
  $options['data_source'] = array(
    'default' => '',
  );
  $options['name_field'] = array(
    'default' => '',
  );
  $options['description_field'] = array(
    'default' => '',
  );
  $options['view_mode'] = array(
    'default' => 'full',
  );
  $options['map'] = array(
    'default' => '',
  );
  $options['height'] = array(
    'default' => '400',
  );
  $options['hide_empty'] = array(
    'default' => '',
  );
  $options['popup']['contains'] = array(
    'show' => array(
      'default' => '',
    ),
    'text' => array(
      'default' => '',
    ),
  );
  $options['zoom']['contains'] = array(
    'initialZoom' => array(
      'default' => '',
    ),
    'minZoom' => array(
      'default' => 0,
    ),
    'maxZoom' => array(
      'default' => 18,
    ),
    'scrollWheelZoom' => array(
      'default' => 1,
    ),
  );
  $options['icon']['contains'] = array(
    'iconType' => array(
      'default' => 'marker',
    ),
    'iconUrl' => array(
      'default' => '',
    ),
    'shadowUrl' => array(
      'default' => '',
    ),
    'iconSize' => array(
      'contains' => array(
        'x' => array(
          'default' => '',
        ),
        'y' => array(
          'default' => '',
        ),
      ),
    ),
    'iconAnchor' => array(
      'contains' => array(
        'x' => array(
          'default' => '',
        ),
        'y' => array(
          'default' => '',
        ),
      ),
    ),
    'shadowAnchor' => array(
      'contains' => array(
        'x' => array(
          'default' => '',
        ),
        'y' => array(
          'default' => '',
        ),
      ),
    ),
    'popupAnchor' => array(
      'contains' => array(
        'x' => array(
          'default' => '',
        ),
        'y' => array(
          'default' => '',
        ),
      ),
    ),
    'html' => array(
      'default' => '',
    ),
    'iconImageStyle' => array(
      'default' => '',
    ),
    'htmlClass' => array(
      'default' => '',
    ),
  );
  $options['vector_display']['contains'] = array(
    'stroke_override' => array(
      'default' => 0,
    ),
    'stroke' => array(
      'default' => 1,
    ),
    'color' => array(
      'default' => '',
    ),
    'weight' => array(
      'default' => '',
    ),
    'opacity' => array(
      'default' => '',
    ),
    'dashArray' => array(
      'default' => '',
    ),
    'fill' => array(
      'default' => 1,
    ),
    'fillColor' => array(
      'default' => '',
    ),
    'fillOpacity' => array(
      'default' => '',
    ),
    'clickable' => array(
      'default' => 1,
    ),
  );
  return $options;
}