You are here

function theme_openlayers_behaviors_tooltip_container in Openlayers 6

Theme function for form description of layers

Parameters

$behavior: Array of data about behavior

$map: Array of map data

Return value

Themed output for tooltip container

1 theme call to theme_openlayers_behaviors_tooltip_container()
openlayers_behaviors_process_tooltip in modules/openlayers_behaviors/includes/openlayers_behaviors.behaviors.inc
Callback for OpenLayers Behaviors (Tooltip)

File

modules/openlayers_behaviors/includes/openlayers_behaviors.theme.inc, line 20
This file holds the theme functions for openlayers behaviors module

Code

function theme_openlayers_behaviors_tooltip_container($behavior = array(), $map = array()) {
  $path_point_image = drupal_get_path('module', 'openlayers_behaviors') . '/images/pointy.png';
  $attr = array(
    'class' => 'openlayers-tooltip-point',
  );
  $point_image = theme('image', $path_point_image, t('Tooltip point'), '', $attr, FALSE);

  // Create output
  $output = '
    <div id="' . $behavior['container_id'] . '"  class="openlayers-behaviors-tooltip-container">
      <div id="' . $behavior['tooltip_id'] . '" class="openlayers-behaviors-tooltip">
        ' . $point_image . '
        <span id="' . $behavior['attribute_id'] . '" class="openlayers-behaviors-tooltip-text"></span>
      </div>
    </div>
  ';
  return $output;
}