You are here

function getlocations_plugin_style_map::option_definition in Get Locations 6

Same name and namespace in other branches
  1. 6.2 getlocations_plugin_style_map.inc \getlocations_plugin_style_map::option_definition()
  2. 7.2 views/getlocations_plugin_style_map.inc \getlocations_plugin_style_map::option_definition()
  3. 7 views/getlocations_plugin_style_map.inc \getlocations_plugin_style_map::option_definition()

File

./getlocations_plugin_style_map.inc, line 22
Contains the getlocations style plugin.

Class

getlocations_plugin_style_map
Getlocations style plugin to render rows as icons on a map.

Code

function option_definition() {
  drupal_add_js(GETLOCATIONS_PATH . '/js/getlocations_views.js');
  $options = parent::option_definition();
  $getlocations_defaults = getlocations_defaults();
  $options['width'] = array(
    'default' => $getlocations_defaults['width'],
  );
  $options['height'] = array(
    'default' => $getlocations_defaults['height'],
  );
  $options['node_map_marker'] = array(
    'default' => $getlocations_defaults['node_map_marker'],
  );
  $options['latlong'] = array(
    'default' => $getlocations_defaults['latlong'],
  );
  $options['zoom'] = array(
    'default' => $getlocations_defaults['zoom'],
  );
  $options['controltype'] = array(
    'default' => $getlocations_defaults['controltype'],
  );
  $options['pancontrol'] = array(
    'default' => $getlocations_defaults['pancontrol'],
  );
  $options['mtc'] = array(
    'default' => $getlocations_defaults['mtc'],
  );
  $options['maptype'] = array(
    'default' => $getlocations_defaults['maptype'],
  );
  $options['baselayers'] = array(
    'default' => $getlocations_defaults['baselayers'],
  );
  $options['behavior'] = array(
    'default' => $getlocations_defaults['behavior'],
  );
  $options['streetview_show'] = array(
    'default' => $getlocations_defaults['streetview_show'],
  );
  $options['trafficinfo'] = array(
    'default' => $getlocations_defaults['trafficinfo'],
  );
  $options['trafficinfo_state'] = array(
    'default' => $getlocations_defaults['trafficinfo_state'],
  );
  $options['transitinfo'] = array(
    'default' => $getlocations_defaults['transitinfo'],
  );
  $options['transitinfo_state'] = array(
    'default' => $getlocations_defaults['transitinfo_state'],
  );
  $options['bicycleinfo'] = array(
    'default' => $getlocations_defaults['bicycleinfo'],
  );
  $options['bicycleinfo_state'] = array(
    'default' => $getlocations_defaults['bicycleinfo_state'],
  );
  $options['panoramio_use'] = array(
    'default' => $getlocations_defaults['panoramio_use'],
  );
  $options['panoramio_state'] = array(
    'default' => $getlocations_defaults['panoramio_state'],
  );
  $options['panoramio_show'] = array(
    'default' => $getlocations_defaults['panoramio_show'],
  );
  $options['places'] = array(
    'default' => $getlocations_defaults['places'],
  );
  $options['poi_show'] = array(
    'default' => $getlocations_defaults['poi_show'],
  );
  $options['transit_show'] = array(
    'default' => $getlocations_defaults['transit_show'],
  );
  $options['minzoom'] = array(
    'default' => $getlocations_defaults['minzoom'],
  );
  $options['maxzoom'] = array(
    'default' => $getlocations_defaults['maxzoom'],
  );
  $options['nodezoom'] = array(
    'default' => $getlocations_defaults['nodezoom'],
  );
  $options['markeraction'] = array(
    'default' => $getlocations_defaults['markeraction'],
  );
  $options['markeractiontype'] = array(
    'default' => $getlocations_defaults['markeractiontype'],
  );
  $options['markermanagertype'] = array(
    'default' => $getlocations_defaults['markermanagertype'],
  );
  $options['usemarkermanager'] = array(
    'default' => $getlocations_defaults['usemarkermanager'],
  );
  $options['useclustermanager'] = array(
    'default' => $getlocations_defaults['useclustermanager'],
  );
  $options['weather_use'] = array(
    'default' => $getlocations_defaults['weather_use'],
  );
  $options['weather_show'] = array(
    'default' => $getlocations_defaults['weather_show'],
  );
  $options['weather_state'] = array(
    'default' => $getlocations_defaults['weather_state'],
  );
  $options['map_backgroundcolor'] = array(
    'default' => $getlocations_defaults['map_backgroundcolor'],
  );
  if (!$getlocations_defaults['markermanagertype']) {
    $options['usemarkermanager'] = 0;
    $options['useclustermanager'] = 0;
  }
  $options['markerclusterer_style'] = array(
    'default' => $getlocations_defaults['markerclusterer_style'],
  );
  $options['markerclusterer_zoom'] = array(
    'default' => $getlocations_defaults['markerclusterer_zoom'],
  );
  $options['markerclusterer_size'] = array(
    'default' => $getlocations_defaults['markerclusterer_size'],
  );
  $options['markerclusterer_minsize'] = array(
    'default' => $getlocations_defaults['markerclusterer_minsize'],
  );
  $options['pansetting'] = array(
    'default' => $getlocations_defaults['pansetting'],
  );
  $options['draggable'] = array(
    'default' => $getlocations_defaults['draggable'],
  );
  $options['styles'] = array(
    'default' => $getlocations_defaults['styles'],
  );
  $options['custom_content_enable'] = array(
    'default' => $getlocations_defaults['custom_content_enable'],
  );
  $options['custom_content_source'] = array(
    'default' => $getlocations_defaults['custom_content_source'],
  );

  // node type markers
  $getlocations_node_marker = variable_get('getlocations_node_marker', array(
    'enable' => 0,
  ));
  if ($getlocations_node_marker['enable']) {
    if ($types = getlocations_get_types()) {
      foreach ($types as $type => $name) {
        $mkey = 'node_marker__' . $type;
        $mmarker = isset($getlocations_node_marker['content_type'][$type]['map_marker']) ? $getlocations_node_marker['content_type'][$type]['map_marker'] : $getlocations_defaults['map_marker'];
        $options[$mkey] = array(
          'default' => $mmarker,
        );
      }
    }
  }
  return $options;
}