You are here

protected function StyledGoogleMapStyle::defineOptions in Styled Google Map 8.2

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/StyledGoogleMapStyle.php, line 57

Class

StyledGoogleMapStyle
Views area StyledGoogleMapStyle handler.

Namespace

Drupal\styled_google_map\Plugin\views\style

Code

protected function defineOptions() {
  $options = parent::defineOptions();

  // Default main options.
  $options['main'] = [
    'contains' => [
      'styled_google_map_gesture_handling' => [
        'default' => StyledGoogleMapInterface::STYLED_GOOGLE_MAP_DEFAULT_GESTURE,
      ],
      'styled_google_map_view_active_pin' => [
        'default' => '',
      ],
      'styled_google_map_view_height' => [
        'default' => StyledGoogleMapInterface::STYLED_GOOGLE_MAP_DEFAULT_WIDTH,
      ],
      'styled_google_map_view_width' => [
        'default' => StyledGoogleMapInterface::STYLED_GOOGLE_MAP_DEFAULT_HEIGHT,
      ],
      'styled_google_map_view_style' => [
        'default' => StyledGoogleMapInterface::STYLED_GOOGLE_MAP_DEFAULT_STYLE,
      ],
      'styled_google_map_view_pin_width' => [
        'default' => '',
      ],
      'styled_google_map_view_pin_height' => [
        'default' => '',
      ],
      'styled_google_map_view_zoom_default' => [
        'default' => StyledGoogleMapInterface::STYLED_GOOGLE_MAP_DEFAULT_ZOOM,
      ],
      'styled_google_map_view_zoom_max' => [
        'default' => StyledGoogleMapInterface::STYLED_GOOGLE_MAP_DEFAULT_MAX_ZOOM,
      ],
      'styled_google_map_view_zoom_min' => [
        'default' => StyledGoogleMapInterface::STYLED_GOOGLE_MAP_DEFAULT_MIN_ZOOM,
      ],
      'styled_google_map_view_maptype' => [
        'default' => StyledGoogleMapInterface::STYLED_GOOGLE_MAP_DEFAULT_MAP_TYPE,
      ],
      'styled_google_map_view_maptypecontrol' => [
        'default' => StyledGoogleMapInterface::STYLED_GOOGLE_MAP_DEFAULT_MAP_TYPE_CONTROL,
      ],
      'styled_google_map_view_scalecontrol' => [
        'default' => StyledGoogleMapInterface::STYLED_GOOGLE_MAP_DEFAULT_SCALE_CONTROL,
      ],
      'styled_google_map_view_rotatecontrol' => [
        'default' => StyledGoogleMapInterface::STYLED_GOOGLE_MAP_DEFAULT_ROTATE_CONTROL,
      ],
      'styled_google_map_view_draggable' => [
        'default' => StyledGoogleMapInterface::STYLED_GOOGLE_MAP_DEFAULT_DRAGGABLE,
      ],
      'styled_google_map_view_mobile_draggable' => [
        'default' => StyledGoogleMapInterface::STYLED_GOOGLE_MAP_DEFAULT_MOBILE_DRAGGABLE,
      ],
      'styled_google_map_view_zoomcontrol' => [
        'default' => StyledGoogleMapInterface::STYLED_GOOGLE_MAP_DEFAULT_ZOOM_CONTROL,
      ],
      'styled_google_map_view_fullscreen' => [
        'default' => StyledGoogleMapInterface::STYLED_GOOGLE_MAP_DEFAULT_FULLSCREEN,
      ],
      'styled_google_map_view_streetviewcontrol' => [
        'default' => StyledGoogleMapInterface::STYLED_GOOGLE_MAP_DEFAULT_STREET_VIEW_CONTROL,
      ],
      'styled_google_map_default_map_center' => [
        'default' => [
          'lat' => 0,
          'lon' => 90,
        ],
      ],
    ],
  ];
  $options['marker_label_settings'] = [
    'contains' => [
      'color' => [
        'default' => 'black',
      ],
      'fontFamily' => [
        'default' => 'Arial',
      ],
      'fontSize' => [
        'default' => '14px',
      ],
      'fontWeight' => [
        'default' => 'normal',
      ],
    ],
  ];

  // Default popup options.
  $options['popup'] = [
    'contains' => [
      'open_event' => [
        'default' => StyledGoogleMapInterface::STYLED_GOOGLE_MAP_DEFAULT_OPEN_EVENT,
      ],
      'second_click' => [
        'default' => 0,
      ],
      'styled_google_map_view_shadow_style' => [
        'default' => StyledGoogleMapInterface::STYLED_GOOGLE_MAP_DEFAULT_SHADOW_STYLE,
      ],
      'styled_google_map_view_padding' => [
        'default' => StyledGoogleMapInterface::STYLED_GOOGLE_MAP_DEFAULT_PADDING,
      ],
      'styled_google_map_view_border_radius' => [
        'default' => StyledGoogleMapInterface::STYLED_GOOGLE_MAP_DEFAULT_BORDER_RADIUS,
      ],
      'styled_google_map_view_border_width' => [
        'default' => StyledGoogleMapInterface::STYLED_GOOGLE_MAP_DEFAULT_BORDER_WIDTH,
      ],
      'styled_google_map_view_border_color' => [
        'default' => StyledGoogleMapInterface::STYLED_GOOGLE_MAP_DEFAULT_BORDER_COLOR,
      ],
      'styled_google_map_view_background_color' => [
        'default' => StyledGoogleMapInterface::STYLED_GOOGLE_MAP_DEFAULT_BACKGROUND_COLOR,
      ],
      'styled_google_map_view_min_width' => [
        'default' => StyledGoogleMapInterface::STYLED_GOOGLE_MAP_DEFAULT_MIN_WIDTH,
      ],
      'styled_google_map_view_max_width' => [
        'default' => StyledGoogleMapInterface::STYLED_GOOGLE_MAP_DEFAULT_MAX_WIDTH,
      ],
      'styled_google_map_view_min_height' => [
        'default' => StyledGoogleMapInterface::STYLED_GOOGLE_MAP_DEFAULT_MIN_HEIGHT,
      ],
      'styled_google_map_view_max_height' => [
        'default' => StyledGoogleMapInterface::STYLED_GOOGLE_MAP_DEFAULT_MAX_HEIGHT,
      ],
      'styled_google_map_view_auto_close' => [
        'default' => StyledGoogleMapInterface::STYLED_GOOGLE_MAP_DEFAULT_AUTO_CLOSE,
      ],
      'styled_google_map_view_arrow_size' => [
        'default' => StyledGoogleMapInterface::STYLED_GOOGLE_MAP_DEFAULT_ARROW_SIZE,
      ],
      'styled_google_map_view_arrow_position' => [
        'default' => StyledGoogleMapInterface::STYLED_GOOGLE_MAP_DEFAULT_ARROW_POSITION,
      ],
      'styled_google_map_view_arrow_style' => [
        'default' => StyledGoogleMapInterface::STYLED_GOOGLE_MAP_DEFAULT_ARROW_STYLE,
      ],
      'styled_google_map_view_disable_auto_pan' => [
        'default' => StyledGoogleMapInterface::STYLED_GOOGLE_MAP_DEFAULT_DISABLE_AUTO_PAN,
      ],
      'styled_google_map_view_hide_close_button' => [
        'default' => StyledGoogleMapInterface::STYLED_GOOGLE_MAP_DEFAULT_HIDE_CLOSE_BUTTON,
      ],
      'styled_google_map_view_disable_animation' => [
        'default' => StyledGoogleMapInterface::STYLED_GOOGLE_MAP_DEFAULT_DISABLE_ANIMATION,
      ],
    ],
  ];

  // Default popup classes options.
  $options['popup_classes'] = [
    'contains' => [
      'styled_google_map_view_background_class' => [
        'default' => StyledGoogleMapInterface::STYLED_GOOGLE_MAP_DEFAULT_BACKGROUND_CLASS,
      ],
      'styled_google_map_view_content_container_class' => [
        'default' => StyledGoogleMapInterface::STYLED_GOOGLE_MAP_DEFAULT_CONTENT_CONTAINER_CLASS,
      ],
      'styled_google_map_view_arrow_class' => [
        'default' => StyledGoogleMapInterface::STYLED_GOOGLE_MAP_DEFAULT_ARROW_CLASS,
      ],
      'styled_google_map_view_arrow_outer_class' => [
        'default' => StyledGoogleMapInterface::STYLED_GOOGLE_MAP_DEFAULT_ARROW_OUTER_CLASS,
      ],
      'styled_google_map_view_arrow_inner_class' => [
        'default' => StyledGoogleMapInterface::STYLED_GOOGLE_MAP_DEFAULT_ARROW_INNER_CLASS,
      ],
    ],
  ];

  // Default cluster settings.
  $options['cluster_settings'] = [
    'contains' => [
      'cluster_enabled' => [
        'default' => 0,
      ],
      'pin_image' => [
        'default' => '',
      ],
      'text_color' => [
        'default' => StyledGoogleMapInterface::STYLED_GOOGLE_MAP_DEFAULT_CLUSTER_TEXT_COLOR,
      ],
      'height' => [
        'default' => StyledGoogleMapInterface::STYLED_GOOGLE_MAP_DEFAULT_CLUSTER_HEIGHT,
      ],
      'width' => [
        'default' => StyledGoogleMapInterface::STYLED_GOOGLE_MAP_DEFAULT_CLUSTER_WIDTH,
      ],
      'text_size' => [
        'default' => StyledGoogleMapInterface::STYLED_GOOGLE_MAP_DEFAULT_CLUSTER_TEXT_SIZE,
      ],
      'min_size' => [
        'default' => StyledGoogleMapInterface::STYLED_GOOGLE_MAP_DEFAULT_CLUSTER_MIN_SIZE,
      ],
    ],
  ];

  // Default spider settings.
  $options['spider_settings'] = [
    'contains' => [
      'spider_enabled' => [
        'default' => 0,
      ],
      'pin_image' => [
        'default' => '',
      ],
      'height' => [
        'default' => StyledGoogleMapInterface::STYLED_GOOGLE_MAP_DEFAULT_SPIDERFIER_HEIGHT,
      ],
      'width' => [
        'default' => StyledGoogleMapInterface::STYLED_GOOGLE_MAP_DEFAULT_SPIDERFIER_WIDTH,
      ],
      'markers_wont_move' => [
        'default' => StyledGoogleMapInterface::STYLED_GOOGLE_MAP_DEFAULT_SPIDERFIER_MARKERS_WONT_MOVE,
      ],
      'markers_wont_hide' => [
        'default' => StyledGoogleMapInterface::STYLED_GOOGLE_MAP_DEFAULT_SPIDERFIER_MARKERS_WONT_HIDE,
      ],
      'basic_format_events' => [
        'default' => StyledGoogleMapInterface::STYLED_GOOGLE_MAP_DEFAULT_SPIDERFIER_BASIC_FORMAT_EVENTS,
      ],
      'keep_spiderfied' => [
        'default' => StyledGoogleMapInterface::STYLED_GOOGLE_MAP_DEFAULT_SPIDERFIER_KEEP_SPIDERFIED,
      ],
      'nearby_distance' => [
        'default' => StyledGoogleMapInterface::STYLED_GOOGLE_MAP_DEFAULT_SPIDERFIER_NEARBY_DISTANCE,
      ],
      'circle_spiral_switchover' => [
        'default' => StyledGoogleMapInterface::STYLED_GOOGLE_MAP_DEFAULT_SPIDERFIER_CIRCLE_SPIRAL_SWITCHOVER,
      ],
      'leg_weight' => [
        'default' => StyledGoogleMapInterface::STYLED_GOOGLE_MAP_DEFAULT_SPIDERFIER_LEG_WEIGHT,
      ],
      'circleFootSeparation' => [
        'default' => StyledGoogleMapInterface::STYLED_GOOGLE_MAP_DEFAULT_SPIDERFIER_CIRCLE_FOOT_SAPARATION,
      ],
      'spiralFootSeparation' => [
        'default' => StyledGoogleMapInterface::STYLED_GOOGLE_MAP_DEFAULT_SPIDERFIER_SPIRAL_FOOT_SAPARATION,
      ],
    ],
  ];

  // Default heat map settings.
  $options['heatmap_settings'] = [
    'contains' => [
      'heatmap_enabled' => [
        'default' => StyledGoogleMapInterface::STYLED_GOOGLE_MAP_DEFAULT_HEATMAP_ENABLED,
      ],
      'dissipating' => [
        'default' => StyledGoogleMapInterface::STYLED_GOOGLE_MAP_DEFAULT_HEATMAP_DISSIPATING,
      ],
      'gradient' => [
        'default' => StyledGoogleMapInterface::STYLED_GOOGLE_MAP_DEFAULT_HEATMAP_GRADIENT,
      ],
      'maxIntensity' => [
        'default' => StyledGoogleMapInterface::STYLED_GOOGLE_MAP_DEFAULT_HEATMAP_MAX_INTENSITY,
      ],
      'opacity' => [
        'default' => StyledGoogleMapInterface::STYLED_GOOGLE_MAP_DEFAULT_HEATMAP_OPACITY,
      ],
      'radius' => [
        'default' => StyledGoogleMapInterface::STYLED_GOOGLE_MAP_DEFAULT_HEATMAP_RADIUS,
      ],
    ],
  ];
  return $options;
}