Skip to content
Snippets Groups Projects
gmap_plugin_style_gmapextended.inc 13.89 KiB
<?php

/**
 * @file
 * GMap style plugin.
 */

/**
 * Style plugin to render a map.
 *
 * @ingroup views_style_plugins
 */
class gmap_plugin_style_gmapextended extends views_plugin_style {
  /**
   * Set default options
   */
  function option_definition() {
    $options = parent::option_definition();
    
    $options['fallback_values'] = array('default' => array());
    $options['field_purposes'] = array('default' => array());

    $options['macro'] = array(
      'default' => '[gmap ]',
    );

    $options['datasource'] = array(
      'default' => 'location',
    );

    $options['clickmode'] = array('default' => 'render');

    $options['markers'] = array('default' => 'static');
    $options['markertype'] = array('default' => 'drupal');

    $options['enablermt'] = array('default' => FALSE);
    $options['rmtcallback'] = array('default' => '');

    /*
    $options['center_on_nodearg'] = array('default' => 0);
    $options['center_on_nodearg_arg'] = array('default' => '');

    $options['highlight_nodearg'] = array('default' => 0);
    $options['highlight_nodearg_arg'] = array('default' => '');
    $options['highlight_nodearg_color'] = array('default' => '#FF0000');
    */

    return $options;
  }

  function purpose_list() {
    return array(
      '' => t('Unused'),
      'text' => t('Marker bubble contents'),
      'rmt' => t('RMT tail'), // @@@ Stupid title
      'iwq' => t('Info window query'),
      'iwo' => t('Info window offset'),
      'link' => t('URL to visit when clicking marker'),
      'latitude' => t('Marker latitude'),
      'longitude' => t('Marker longitude'),
      'dyn' => t('Address for dynamic geocoding'),
      'title' => t('Marker title (tooltip)'),
      'markername' => t('Marker type'),
      'offset' => t('Marker offset'),
    );
  }

  function query() {
    parent::query();