You are here

class openlayers_plus_behavior_tooltips in OpenLayers Plus 7

Same name and namespace in other branches
  1. 7.3 behaviors/openlayers_plus_behavior_tooltips.inc \openlayers_plus_behavior_tooltips

Hierarchy

Expanded class hierarchy of openlayers_plus_behavior_tooltips

1 string reference to 'openlayers_plus_behavior_tooltips'
openlayers_plus_openlayers_behaviors in ./openlayers_plus.module
Implements hook_openlayers_behaviors().

File

behaviors/openlayers_plus_behavior_tooltips.inc, line 3

View source
class openlayers_plus_behavior_tooltips extends openlayers_behavior {

  /**
   * Override of options_init().
   */
  function options_init() {
    return array(
      'positioned' => FALSE,
    );
  }

  /**
   * Override of options_form().
   */
  function options_form($defaults) {
    return array(
      'positioned' => array(
        '#type' => 'checkbox',
        '#title' => t('Position tooltip over feature'),
        '#default_value' => isset($defaults['positioned']) ? $defaults['positioned'] : array(),
      ),
    );
  }

  /**
   * Render.
   */
  function render(&$map) {
    drupal_add_js(drupal_get_path('module', 'openlayers_plus') . '/behaviors/openlayers_plus_behavior_tooltips.js');
    return $this->options;
  }

}

Members